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
|
# verify webroot actually exists
|
||||||
checkExist fd "$webroot"
|
checkExist fd "$webroot"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "1" ]; then
|
if [ "$checkResult" -eq 1 ]; then
|
||||||
# webroot directory specified could not be found
|
# webroot directory specified could not be found
|
||||||
echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \
|
echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \
|
||||||
>> "$logFile"
|
>> "$logFile"
|
||||||
@ -509,10 +509,10 @@ else
|
|||||||
# webroot exists
|
# webroot exists
|
||||||
echo -e "${op}[$(stamp)] Using webroot: ${lit}${webroot}${normal}" \
|
echo -e "${op}[$(stamp)] Using webroot: ${lit}${webroot}${normal}" \
|
||||||
>> "$logFile"
|
>> "$logFile"
|
||||||
# Verify 503 file existance at given path
|
# Verify 503 file existence at given path
|
||||||
checkExist ff "$err503Path"
|
checkExist ff "$err503Path"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "1" ]; then
|
if [ "$checkResult" -eq 1 ]; then
|
||||||
# 503 file could not be found
|
# 503 file could not be found
|
||||||
echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \
|
echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \
|
||||||
>> "$logFile"
|
>> "$logFile"
|
||||||
@ -520,17 +520,17 @@ else
|
|||||||
clean503=0
|
clean503=0
|
||||||
else
|
else
|
||||||
# 503 file exists and webroot is valid. Let's copy it!
|
# 503 file exists and webroot is valid. Let's copy it!
|
||||||
echo -e "${op}[$(stamp)] ${err503File} found at ${lit}${err503Path}" \
|
echo -e "${op}[$(stamp)] ${err503File} found at" \
|
||||||
"${normal}" >> "$logFile"
|
"${lit}${err503Path}${normal}" >> "$logFile"
|
||||||
echo -e "${op}[$(stamp)] Copying 503 error page to webroot..." \
|
echo -e "${op}[$(stamp)] Copying 503 error page to webroot..." \
|
||||||
"${normal}" >> "$logFile"
|
"${normal}" >> "$logFile"
|
||||||
cp "${err503Path}" "$webroot/" >> "$logFile" 2>&1
|
cp "${err503Path}" "$webroot/" >> "$logFile" 2>&1
|
||||||
copyResult="$?"
|
copyResult="$?"
|
||||||
# verify copy was successful
|
# verify copy was successful
|
||||||
if [ "$copyResult" = "1" ]; then
|
if [ "$copyResult" -eq 1 ]; then
|
||||||
# copy was unsuccessful
|
# copy was unsuccessful
|
||||||
echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --${normal}" \
|
echo -e "${info}[$(stamp)] -- [INFO] ${warn503} --" \
|
||||||
>> "$logFile"
|
"${normal}" >> "$logFile"
|
||||||
exitWarn+=("[$(stamp)]_5035")
|
exitWarn+=("[$(stamp)]_5035")
|
||||||
clean503=0
|
clean503=0
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user