From 42fd9349b72561675adc38ecfc01b231a1704936 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 24 May 2019 21:19:23 -0600 Subject: [PATCH] default 503 checks if necessary --- backup_new.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backup_new.sh b/backup_new.sh index 2bf2932..0effdcf 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -257,6 +257,16 @@ if ! command -v borg > /dev/null; then printf "\n${err}ERROR: BORG is not installed on this system!${norm}\n\n" exit 3 fi +# 503 functionality +if [ $use503 -eq 1 ]; then + if [ ! -f "$err503Path" ]; then + badParam dne "(--503-path default)" "$err503Path" + elif [ ! -d "$webroot" ]; then + badParam dne "(--webroot default)" "$webroot" + fi + printf "${cyan}[%s] -- [INFO] Using 503 functionality --${norm}\n" \ + "$(stamp)" >> "$logFile" +fi ### start logging