From c4897cd0e219f4a945573b19b616f3630c108dd9 Mon Sep 17 00:00:00 2001 From: Sven Hoexter Date: Sun, 21 Apr 2013 15:56:09 +0200 Subject: [PATCH] Call error code variable ERRSTAT, that is what it is called within the code and also log the code in case of != 0 --- hetzner/hetznerbackupv2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5