diff --git a/backup.sh b/backup.sh index 039e4fe..693e61e 100755 --- a/backup.sh +++ b/backup.sh @@ -499,7 +499,7 @@ else # verify webroot actually exists checkExist fd "$webroot" checkResult="$?" - if [ "$checkResult" = "1" ]; then + if [ "$checkResult" -eq 1 ]; then # webroot directory specified could not be found echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \ >> "$logFile" @@ -509,10 +509,10 @@ else # webroot exists echo -e "${op}[$(stamp)] Using webroot: ${lit}${webroot}${normal}" \ >> "$logFile" - # Verify 503 file existance at given path + # Verify 503 file existence at given path checkExist ff "$err503Path" checkResult="$?" - if [ "$checkResult" = "1" ]; then + if [ "$checkResult" -eq 1 ]; then # 503 file could not be found echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \ >> "$logFile" @@ -520,17 +520,17 @@ else clean503=0 else # 503 file exists and webroot is valid. Let's copy it! - echo -e "${op}[$(stamp)] ${err503File} found at ${lit}${err503Path}" \ - "${normal}" >> "$logFile" + echo -e "${op}[$(stamp)] ${err503File} found at" \ + "${lit}${err503Path}${normal}" >> "$logFile" echo -e "${op}[$(stamp)] Copying 503 error page to webroot..." \ "${normal}" >> "$logFile" cp "${err503Path}" "$webroot/" >> "$logFile" 2>&1 copyResult="$?" # verify copy was successful - if [ "$copyResult" = "1" ]; then + if [ "$copyResult" -eq 1 ]; then # copy was unsuccessful - echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \ - >> "$logFile" + echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --" \ + "${normal}" >> "$logFile" exitWarn+=("[$(stamp)]_5035") clean503=0 else