Changed 503 file name variable

This commit is contained in:
Asif Bacchus 2018-09-20 00:22:40 -06:00
parent 169219bd91
commit 44a67156a3

View File

@ -132,7 +132,7 @@ unset PARAMS
unset borgCreateParams unset borgCreateParams
unset borgPruneParams unset borgPruneParams
unset sqlDumpDir unset sqlDumpDir
unset location503 unset err503File
unset webroot unset webroot
errorExplain=() errorExplain=()
exitWarn=() exitWarn=()
@ -179,8 +179,8 @@ while getopts ':l:nv5:w:' PARAMS; do
borgPruneParams='--list' borgPruneParams='--list'
;; ;;
5) 5)
# 503 error page location # 503 error page name
location503="${OPTARG}" err503File="${OPTARG}"
;; ;;
w) w)
# path to webroot for NextCloud installation # path to webroot for NextCloud installation
@ -218,14 +218,14 @@ echo -e "${ltYellow}${sqlDumpDir}/${sqlDumpFile}${normal}" >> "$logFile"
### 503 error page ### 503 error page
# Verify 503 existance # Verify 503 existance
if [ -z "$location503" ]; then if [ -z "$err503File" ]; then
# no 503 file has been provided # no 503 file has been provided
echo -e "${yellow}${stamp} -- [WARNING] code 5031 --${normal}" \ echo -e "${yellow}${stamp} -- [WARNING] code 5031 --${normal}" \
>> "$logFile" >> "$logFile"
echo -e "$warn503" >> "$logFile" echo -e "$warn503" >> "$logFile"
exitWarn+=('5031') exitWarn+=('5031')
else else
checkExist ff "$location503" checkExist ff "$err503File"
checkResult="$?" checkResult="$?"
if [ "$checkResult" = "1" ]; then if [ "$checkResult" = "1" ]; then
# 503 file specified could not be found # 503 file specified could not be found
@ -255,7 +255,7 @@ 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
cp "${location503}" "$webroot/" >> "$logFile" 2>&1 cp "${err503File}" "$webroot/" >> "$logFile" 2>&1
copyResult="$?" copyResult="$?"
# verify copy was successful # verify copy was successful
if [ "$copyResult" = "1" ]; then if [ "$copyResult" = "1" ]; then