From c9926d7c4d00c46e8ab817a616e30f10d5bd68ed Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sun, 21 Oct 2018 03:43:50 -0600 Subject: [PATCH] Updated SQL & redis checkResult comparison operators --- root/scripts/backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/scripts/backup.sh b/root/scripts/backup.sh index 00dbf31..bba757f 100644 --- a/root/scripts/backup.sh +++ b/root/scripts/backup.sh @@ -545,7 +545,7 @@ echo -e "${op}${stamp} Dumping mailcow SQL database...${normal}" >> "$logFile" docker-compose exec mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > "$sqlDumpDir/$sqlDumpFile" >> "$logFile" 2>&1 checkResult=$(docker-compose exec mysql-mailcow echo "$?") # verify sql dump was successful -if [ "$checkResult" -eq 0 ]; then +if [ "$checkResult"=0 ]; then echo -e "${ok}${stamp} -- [SUCCESS] SQL successfully dumped --${normal}" \ >> "$logFile" else @@ -558,7 +558,7 @@ echo -e "${op}${stamp} Saving redis state information...${normal}" >> "$logFile" docker-compose exec redis-mailcow redis-cli save >> "$logFile" 2>&1 checkResult=$(docker-compose exec redis-mailcow echo "$?") # Verify save was successful -if [ "$checkResult" -eq 0 ]; then +if [ "$checkResult"=0 ]; then echo -e "${ok}${stamp} -- [SUCCESS] redis state saved --${normal}" \ >> "$logFile" else