Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:sftp [29/07/2011 15:01]
andrew
rb:sftp [20/06/2012 12:17]
andrew
Line 17: Line 17:
   MAILTO=andrew.stringer@xxx.com   MAILTO=andrew.stringer@xxx.com
   SENDEMAIL=no   SENDEMAIL=no
-  ​+  ​DATENUM=`date +%d` 
 +  #Test to force 1st of the month 
 +  #​DATENUM=01 
 +  if [ $DATENUM == 01 ] 
 +  then 
 +        MONTHTEST="​ - 1st of the month test email."​ 
 +        SENDEMAIL=yes 
 +  fi
   ​   ​
   SFTP=/​usr/​bin/​sftp   SFTP=/​usr/​bin/​sftp
Line 37: Line 44:
   ​   ​
   #write out start of email log file   #write out start of email log file
-  echo "From /​wworks_ftp/​bar_ia_ftp/​scripts/​ia_ftpupload.sh on gy-asp-cms01 at `date +%H:%M:%S` UTC." > ${EMAIL}+  echo "From /​wworks_ftp/​bar_ia_ftp/​scripts/​ia_ftpupload.sh on xx-cms01 at `date +%H:%M:%S` UTC." > ${EMAIL}
   echo ""​ >> ${EMAIL}   echo ""​ >> ${EMAIL}
   ​   ​
Line 124: Line 131:
           #echo ${SENDEMAIL} >> ${EMAIL}           #echo ${SENDEMAIL} >> ${EMAIL}
           echo "​Sending notification mail at `date +%H:%M:%S` UTC." >> ${EMAIL}           echo "​Sending notification mail at `date +%H:%M:%S` UTC." >> ${EMAIL}
-          /bin/mail ${MAILTO} -s "BAR Casino upload to Incomes Access failed."​ < ${EMAIL}+          /bin/mail ${MAILTO} -s "BAR Casino upload to Incomes Access failed.${MONTHTEST}" < ${EMAIL}
   else   else
           #don't send mail, so mail command is commented out. Left in for testing           #don't send mail, so mail command is commented out. Left in for testing
Line 132: Line 139:
   ​   ​
           echo "​Sending notification mail at `date +%H:%M:%S` UTC." >> ${EMAIL}           echo "​Sending notification mail at `date +%H:%M:%S` UTC." >> ${EMAIL}
-          /bin/mail ${MAILTO} -s "BAR Casino upload to Incomes Access succeded."​ < ${EMAIL}+          /bin/mail ${MAILTO} -s "BAR Casino upload to Incomes Access succeded.${MONTHTEST}" < ${EMAIL}
   fi   fi
   ​   ​

rb/sftp.txt · Last modified: 10/10/2013 15:21 (external edit)