init ems server code
This commit is contained in:
31
src/accountMgr/c_program/sftpSend/parseResult
Normal file
31
src/accountMgr/c_program/sftpSend/parseResult
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
#This script parse the result.txt file
|
||||
#to judge whether the operation of sending file is successful
|
||||
|
||||
#The local do not have the Permission to access the remote directory
|
||||
if [ `grep -c "handle" /tmp/result$1.txt` -gt 0 ] ; then
|
||||
`echo 4 >/tmp/temp$1.txt`
|
||||
#echo "The local do not have the Permission to access the remote directory"
|
||||
exit
|
||||
fi
|
||||
|
||||
#The name or the password is not fit
|
||||
if [ `grep -c "Permission denied" /tmp/result$1.txt` -gt 0 ] ; then
|
||||
`echo 2 >/tmp/temp$1.txt`
|
||||
#echo "The name or the password is not fit"
|
||||
exit
|
||||
fi
|
||||
|
||||
#Successful
|
||||
if [ `grep -c "100%" /tmp/result$1.txt` -gt 0 ] ; then
|
||||
`echo 0 >/tmp/temp$1.txt`
|
||||
#echo "Send the file successfully"
|
||||
exit
|
||||
fi
|
||||
|
||||
#The remote server is unavailable
|
||||
`echo 1 >/tmp/temp$1.txt`
|
||||
#echo "The remote server is unavailable"
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user