Tested 503 section. Cleaned up info and error messages.

This commit is contained in:
Asif Bacchus 2018-09-30 22:19:09 -06:00
parent 239d2c60fb
commit 0802b00a59

View File

@ -116,9 +116,9 @@ function cleanup {
# file still exists # file still exists
exitWarn+=('5030') exitWarn+=('5030')
else else
# file removed # file removed or was never present
echo -e "${op}${stamp} Removed 503 error page" \ echo -e "${op}${stamp} 503 page no longer present (successfully" \
"from webroot${normal}" >> "$logFile" "deleted or it never existed)" >> "$logFile"
fi fi
fi fi
} }
@ -157,7 +157,7 @@ warningExplain[111]="Could not remove SQL dump file and directory. Please remov
warningExplain[5030]="Could not remove 503 error page. This MUST be removed manually before NGINX will serve webclients!" warningExplain[5030]="Could not remove 503 error page. This MUST be removed manually before NGINX will serve webclients!"
warningExplain[5031]="Name of a 503 error page file was not specified (-5 parameter missing)" warningExplain[5031]="Name of a 503 error page file was not specified (-5 parameter missing)"
warningExplain[5032]="The specified 503 error page could not be found" warningExplain[5032]="The specified 503 error page could not be found"
warningExplain[5033]="No webroot path was specified (-r parameter missing)" warningExplain[5033]="No webroot path was specified (-w parameter missing)"
warningExplain[5034]="The specified webroot could not be found" warningExplain[5034]="The specified webroot could not be found"
warningExplain[5035]="Error copying 503 error page to webroot" warningExplain[5035]="Error copying 503 error page to webroot"
warn503="Web users will NOT be informed the server is down!" warn503="Web users will NOT be informed the server is down!"
@ -265,6 +265,8 @@ else
exitWarn+=('5034') exitWarn+=('5034')
else else
# webroot exists and 503 exists, copy 503 to webroot # webroot exists and 503 exists, copy 503 to webroot
echo -e "${op}${stamp} Copying 503 error page to webroot" \
"${normal}" >> "$logFile"
cp "${err503File}" "$webroot/" >> "$logFile" 2>&1 cp "${err503File}" "$webroot/" >> "$logFile" 2>&1
copyResult="$?" copyResult="$?"
# verify copy was successful # verify copy was successful