2021-08-09 22:41:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-12-09 17:16:40 +00:00
|
|
|
set -x
|
|
|
|
|
2021-08-09 22:41:53 +00:00
|
|
|
if [ ! -f "/var/backups/config/config.orig" ]; then
|
|
|
|
|
|
|
|
rm -f /var/backups/config/config.orig
|
|
|
|
cp /var/backups/config/config.php /var/backups/config/config.orig
|
2021-12-10 09:21:36 +00:00
|
|
|
|
|
|
|
# put nextcloud in maintenance mode
|
2021-08-09 22:41:53 +00:00
|
|
|
sed -i "s/);/ \'maintenance\' => true,\n);/g" /var/backups/config/config.php
|
2021-12-10 09:21:36 +00:00
|
|
|
|
2021-08-09 22:41:53 +00:00
|
|
|
chown www-data:root /var/backups/config/config.php
|
|
|
|
touch /var/backups/config/config.php
|
|
|
|
|
|
|
|
fi
|