From 7d3a59222ece4042b02afd26aa1b99faaee86361 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 7 Sep 2018 04:01:54 -0600 Subject: [PATCH] Added error handling to NC maint call section --- root/scripts/borgbackup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/root/scripts/borgbackup.sh b/root/scripts/borgbackup.sh index 6b84fd2..38d071a 100755 --- a/root/scripts/borgbackup.sh +++ b/root/scripts/borgbackup.sh @@ -378,6 +378,13 @@ fi ## Put NextCloud in maintenance mode ncMaint on +# check if it was successful +if [ "$maintResult" = "0" ]; then + echo -e "\e[0;36m...done\e[0m" >> $logFile +else + cleanUp 503 + quit 500 +fi ## Read sqlDetails file and extract necessary information mapfile -t sqlParams < $sqlDetails