Updated NC maint section to use new quit function
This commit is contained in:
parent
185860100d
commit
664290acd2
@ -276,19 +276,16 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
## Put NextCloud in maintenance mode
|
## Put NextCloud in maintenance mode
|
||||||
echo -e "\e[1;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Putting NextCloud" \
|
echo -e "\e[1;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Putting NextCloud" \
|
||||||
"in maintenance mode..." >> $logFile
|
"in maintenance mode..." >> $logFile
|
||||||
sudo -u ${webUser} php ${ncroot}/occ maintenance:mode --on >> $logFile 2>&1
|
sudo -u ${webUser} php ${ncroot}/occ maintenance:mode --on >> $logFile 2>&1
|
||||||
# verify
|
# verify
|
||||||
if [ "$?" = "0" ]; then
|
maintResult="$?"
|
||||||
|
if [ "$mainResult" = "0" ]; then
|
||||||
echo -e "\e[0;36m...done\e[0m" >> $logFile
|
echo -e "\e[0;36m...done\e[0m" >> $logFile
|
||||||
else
|
else
|
||||||
echo -e "\e[1;31m--Error-- There was a problem putting NextCloud" \
|
quit 200
|
||||||
"into maintenance mode" >> $logFile
|
|
||||||
echo -e "\e[4;31mScript aborted\e[0;31m.\e[0m" >> $logFile
|
|
||||||
exit 100
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Read sqlDetails file and extract necessary information
|
## Read sqlDetails file and extract necessary information
|
||||||
|
Loading…
Reference in New Issue
Block a user