From b9a394837269fb2d64e48ebccec50e00ff981a45 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 6 Sep 2018 04:02:21 -0600 Subject: [PATCH] Switched NC failure to exit maint mode from error to warning. --- root/scripts/borgbackup.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/root/scripts/borgbackup.sh b/root/scripts/borgbackup.sh index 70cddbe..9614099 100755 --- a/root/scripts/borgbackup.sh +++ b/root/scripts/borgbackup.sh @@ -365,10 +365,13 @@ fi ## Put NextCloud back into operational mode echo -e "\e[1;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Taking NextCloud" \ - "out of maintenance mode..." >> $logFile + "out of maintenance mode...\e[0m" >> $logFile sudo -u ${webUser} php ${ncroot}/occ maintenance:mode --off >> $logFile 2>&1 -# verify -if [ "$?" = "0" ]; then + +maintResult="$?" + +# verify but continue if problems since we need to cleanup before exiting +if [ "$maintResult" = "0" ]; then echo -e "\e[0;36m...done\e[0m" >> $logFile else echo -e "\e[1;31m--WARNING-- There was a problem taking NextCloud" \