From 14490061c3a08affe420cd410b5665d895af7860 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 7 Sep 2018 04:25:05 -0600 Subject: [PATCH] checkExist: file not found: updated code to 5 and changed occurances --- root/scripts/borgbackup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/root/scripts/borgbackup.sh b/root/scripts/borgbackup.sh index 7d69b05..d04bce9 100755 --- a/root/scripts/borgbackup.sh +++ b/root/scripts/borgbackup.sh @@ -223,7 +223,7 @@ function checkExist { return 3 else # file not found, return proper code - return 3 + return 5 fi elif [ "$1" = "verify" ]; then if [ -e "$2" ]; then @@ -280,7 +280,7 @@ function cleanUp { # verify actually removed checkExist find null "$webroot/$err503FileName" checkResult="$?" - if [ "$checkResult" = "3" ]; then + if [ "$checkResult" = "5" ]; then echo -e "\e[0;36m...done\e[0m" | tee -a $logFileVerbose \ $logFileNormal > /dev/null else @@ -298,7 +298,7 @@ function cleanUp { # verify actually removed checkExist find null "$sqlDumpDir/$sqlDumpFile" checkResult="$?" - if [ "$checkResult" = "3" ]; then + if [ "$checkResult" = "5" ]; then echo -e "\e[0;36m...done\e[0m" >> $logFileVerbose else echo -e "\e[1;33m[`date +%Y-%m-%d` `date +%H:%M:%S`] --WARNING:" \ @@ -514,7 +514,7 @@ rm -f "$webroot/$err503FileName" 2>&1 | tee -a $logFileVerbose $logFileNormal \ # verify actually removed checkExist find null "$webroot/$err503FileName" checkResult="$?" -if [ "$checkResult" = "3" ]; then +if [ "$checkResult" = "5" ]; then echo -e "\e[0;36m...done\e[0m" | tee -a $logFileVerbose $logFileNormal \ > /dev/null else @@ -533,7 +533,7 @@ rm -f "$sqlDumpDir/$sqlDumpFile" >> $logFile 2>&1 # verify actually removed checkExist find null "$sqlDumpDir/$sqlDumpFile" checkResult="$?" -if [ "$checkResult" = "3" ]; then +if [ "$checkResult" = "5" ]; then echo -e "\e[0;36m...done\e[0m" >> $logFileVerbose else echo -e "\e[1;33m[`date +%Y-%m-%d` `date +%H:%M:%S`] --WARNING:" \