Added NC maint error code 100
This commit is contained in:
parent
1e57ea1d15
commit
a7e410970d
@ -31,7 +31,7 @@ function quit {
|
|||||||
echo -e "${yellow}${stamp} Script generated the following" \
|
echo -e "${yellow}${stamp} Script generated the following" \
|
||||||
"warnings:${normal}" >> "$logFile"
|
"warnings:${normal}" >> "$logFile"
|
||||||
for warn in "${exitWarn[@]}"; do
|
for warn in "${exitWarn[@]}"; do
|
||||||
echo -e "${ltYellow}${warn}: ${warningExplain[$warn]}${normal}" \
|
echo -e "\t${ltYellow}${warn}: ${warningExplain[$warn]}${normal}" \
|
||||||
>> "$logFile"
|
>> "$logFile"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -44,7 +44,7 @@ function quit {
|
|||||||
# log error code and exit with said code
|
# log error code and exit with said code
|
||||||
echo -e "${bold}${red}${stamp} -- [ERROR] Script exited with code $1" \
|
echo -e "${bold}${red}${stamp} -- [ERROR] Script exited with code $1" \
|
||||||
" --$normal" >> "$logFile"
|
" --$normal" >> "$logFile"
|
||||||
echo -e "${red}${errorExplain[$1]}$normal" >> "$logFile"
|
echo -e "\t${red}${errorExplain[$1]}$normal" >> "$logFile"
|
||||||
exit "$1"
|
exit "$1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ warningExplain=()
|
|||||||
|
|
||||||
### Error codes
|
### Error codes
|
||||||
errorExplain[2]="This script MUST be run as ROOT."
|
errorExplain[2]="This script MUST be run as ROOT."
|
||||||
|
errorExplain[100]="Could not put NextCloud into Maintenance mode."
|
||||||
|
|
||||||
### Warning codes & messages
|
### Warning codes & messages
|
||||||
warningExplain[5031]="No path to a 503 error page file was specified (-5 parameter missing)"
|
warningExplain[5031]="No path to a 503 error page file was specified (-5 parameter missing)"
|
||||||
@ -235,7 +235,7 @@ if [ "$maintResult" = "0" ]; then
|
|||||||
echo -e "${bold}${cyan}${stamp}...done${normal}" >> "$logFile"
|
echo -e "${bold}${cyan}${stamp}...done${normal}" >> "$logFile"
|
||||||
else
|
else
|
||||||
cleanup 503
|
cleanup 503
|
||||||
quit 200
|
quit 100
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Exit script
|
### Exit script
|
||||||
|
Loading…
Reference in New Issue
Block a user