From 2ad8b671a24ff019cd893a04b7e126bd5888e62d Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Thu, 11 Aug 2016 15:17:43 +0200 Subject: [PATCH] Corrected output check from tar command Was inverted --- lgsm/functions/command_backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 4c9a1b39d..ca6fe9607 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -47,7 +47,7 @@ if [ ! -d "${backupdir}" ]; then mkdir "${backupdir}" fi tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "backups" ./* -if [ $? != 0 ]; then +if [ $? == 0 ]; then fn_print_ok_nl "Backup created: ${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size" fn_script_log_pass "Backup created: ${backupdir}/${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size" else @@ -56,4 +56,4 @@ else fi sleep 1 echo "" -core_exit.sh \ No newline at end of file +core_exit.sh