From: Sven Hoexter Date: Sun, 21 Apr 2013 13:56:09 +0000 (+0200) Subject: Call error code variable ERRSTAT, that is what it is called within the code and also... X-Git-Url: https://git.sven.stormbind.net/?a=commitdiff_plain;h=c4897cd0e219f4a945573b19b616f3630c108dd9;p=sven%2Fscripts.git Call error code variable ERRSTAT, that is what it is called within the code and also log the code in case of != 0 --- diff --git a/hetzner/hetznerbackupv2.sh b/hetzner/hetznerbackupv2.sh index 0ffc0ec..d934a02 100755 --- a/hetzner/hetznerbackupv2.sh +++ b/hetzner/hetznerbackupv2.sh @@ -68,8 +68,8 @@ cleanup() { if [ $ERRSTAT -eq 0 ]; then echo "Backup finished successfully $ENDDATE" >> $SESSIONLOG else - echo "ERROR Backup FAILED $ENDDATE" >> $SESSIONLOG - cat $SESSIONLOG|mail -s "ERROR Backup FAILED $ENDDATE with ERRCODE $ERRSTAT" $ROOTMAIL + echo "ERROR Backup FAILED $ENDDATE with ERRSTAT $ERRSTAT" >> $SESSIONLOG + cat $SESSIONLOG|mail -s "ERROR Backup FAILED $ENDDATE with ERRSTAT $ERRSTAT" $ROOTMAIL fi cat $SESSIONLOG >> $LOGFILE rm $SESSIONLOG $LOCKFILE