copy 503 to webroot and log error

This commit is contained in:
Asif Bacchus 2019-05-24 23:43:28 -06:00
parent 2873edd128
commit 465b386796
1 changed files with 17 additions and 0 deletions

View File

@ -274,6 +274,23 @@ printf "${cyan}[%s] -- [INFO] Log located at ${yellow}%s${cyan} --${norm}\n" \
"$(stamp)" "$logFile" >> "$logFile"
### 503 functionality
if [ $use503 -eq 1 ]; then
printf "${cyan}[%s] -- [INFO] Copying 503 error page to " \
"$(stamp)" >> "$logFile"
printf "webroot -- ${norm}\n" >> "$logFile"
if ! \cp --force "${err503Path}" "${webroot}/${err503File}" 2>> "$logFile"
then
printf "${yellow}[%s] -- [WARNING] Failed to copy 503 error page. " \
"$(stamp)" >> "$logFile"
printf "Web users will NOT be notified --${normal}\n" >> "$logFile"
else
printf "${cyan}[%s] -- [INFO] 503 error page copied --${norm}\n" \
"$(stamp)" >> "$logFile"
fi
fi
### stop seahub and seafile service if offline backup requested
if [ "$offlineBackup" -eq 1 ]; then
seafSvc stop