update 503 section
This commit is contained in:
parent
ad2b7d4029
commit
75cae8c7e6
16
backup.sh
16
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
|
||||
|
Loading…
Reference in New Issue
Block a user