Add first Nextcloud Support

This commit is contained in:
Fliegerjohn 2023-11-22 09:37:46 +01:00
parent 59656c3f83
commit ab99c2d0fe
Signed by: fliegerjohn
GPG key ID: E2221D5FE4656B6A

View file

@ -353,6 +353,27 @@ fi
}
#
## Stop services
#
stopservices() {
if [[ "$nextcloud" = "1" ]]; then
echo "Set Nextcloud to Mainenancemode"
sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/occ maintenance:mode --on
fi
}
#
## Start services
#
startservices() {
if [[ "$nextcloud" = "1" ]]; then
echo "Disable Nextcloud Maintenancemode"
sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/occ maintenance:mode --off
fi
}
#
## Take databasedump
@ -428,9 +449,11 @@ case "$1" in
;;
--backup-with-postgre)
stopservices
readconfig
postgrebackup
backup
startservices
exit 0
;;