From 9dbc610c24103f8d7a80d56e20cad6081d86fe5a Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Wed, 19 Sep 2018 23:43:12 -0600 Subject: [PATCH] Tested and debugged 503 section --- backup.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index 3027202..d9b2bfe 100755 --- a/backup.sh +++ b/backup.sh @@ -204,19 +204,24 @@ else # webroot directory specified could not be found echo -e "${yellow}${stamp} -- [WARNING] code 5034 --" \ "${normal}" >> "$logFile" - echo -e "$warn503" "$logFile" + echo -e "$warn503" >> "$logFile" exitWarn+=('5034') else # webroot exists and 503 exists, copy 503 to webroot - cp "${location503}" "$webroot/" >> "$logFileVerbose" 2>&1 + cp "${location503}" "$webroot/" >> "$logFile" 2>&1 copyResult="$?" # verify copy was successful if [ "$copyResult" = "1" ]; then + # copy was unsuccessful echo -e "${yellow}${stamp} -- [WARNING] code" \ "5035 --${normal}" >> "$logFile" echo -e "$warn503" >> "$logFile" exitWarn+=('5035') - fi # copy was successful + else + # copy was successful + echo -e "${bold}${cyan}${stamp} 503 error page" \ + "copied to webroot${normal}" >> "$logFile" + fi fi fi fi