Fixed exit codes

This commit is contained in:
Asif Bacchus 2018-09-04 22:19:45 -06:00
parent 1ce0bae3bc
commit aaa1cae43d

View File

@ -137,7 +137,7 @@ else
echo -e "\e[1;31m[`date +%Y-%m-%d` `date +%H:%M:%S`]" \ echo -e "\e[1;31m[`date +%Y-%m-%d` `date +%H:%M:%S`]" \
"--Error-- There was a problem creating $sqlDumpDir." >> $logFile "--Error-- There was a problem creating $sqlDumpDir." >> $logFile
echo -e "\e[4;31m--Error-- Script aborted\e[0;31m.\e[0m" >> $logFile echo -e "\e[4;31m--Error-- Script aborted\e[0;31m.\e[0m" >> $logFile
exit 101 exit 200
fi fi
fi fi
@ -206,7 +206,7 @@ if [ "$?" = "0" ]; then
else else
echo -e "\e[1;31m--Error-- There was a problem dumping SQL." >> $logFile echo -e "\e[1;31m--Error-- There was a problem dumping SQL." >> $logFile
echo -e "\e[4;31mScript aborted\e[0;31m.\e[0m" >> $logFile echo -e "\e[4;31mScript aborted\e[0;31m.\e[0m" >> $logFile
exit 102 exit 201
fi fi
## Ready for Borg ## Ready for Borg
@ -273,7 +273,7 @@ else
echo -e "This MUST be done manually or NextCloud will not" \ echo -e "This MUST be done manually or NextCloud will not" \
"function!\e[0m" >> $logFile "function!\e[0m" >> $logFile
echo -e "\e[4;31mScript aborted\e[0;31m.\e[0m" >> $logFile echo -e "\e[4;31mScript aborted\e[0;31m.\e[0m" >> $logFile
exit 102 exit 101
fi fi
## Remove 503 error page from webroot so NGINX serves web clients again ## Remove 503 error page from webroot so NGINX serves web clients again