diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-07-23 20:56:06 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-08-11 00:17:55 +0300 |
commit | 1e98c8e93ccb58fe0dc7bd130d3d4843458c1bf7 (patch) | |
tree | a3d015b7b12d4de2df41ff837129c7f5ba47bb19 /etc/nextcloudpi-config.d/nc-database.sh | |
parent | 41e71b4cbb02a9c3d0be01d25dd49aa39d06b8c8 (diff) |
restart HTTPd delayed on the bg, so it does not kill AJAX responsev0.17.1
Diffstat (limited to 'etc/nextcloudpi-config.d/nc-database.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/nc-database.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/nextcloudpi-config.d/nc-database.sh b/etc/nextcloudpi-config.d/nc-database.sh index 8015e80a..a4b550cf 100644 --- a/etc/nextcloudpi-config.d/nc-database.sh +++ b/etc/nextcloudpi-config.d/nc-database.sh @@ -57,13 +57,16 @@ configure() [[ $( stat -fc%d / ) == $( stat -fc%d $BASEDIR ) ]] && \ echo -e "INFO: moving database to another place in the same SD card\nIf you want to use an external mount, make sure it is properly set up" - service apache2 stop - service mysql stop + cd /var/www/nextcloud + sudo -u www-data php occ maintenance:mode --on + echo "moving database to $DBDIR_..." + service mysql stop mv $SRCDIR "$DBDIR_" || return 1 sed -i "s|^datadir.*|datadir = $DBDIR_|" /etc/mysql/mariadb.conf.d/50-server.cnf + service mysql start - service mysql start && service apache2 start + sudo -u www-data php occ maintenance:mode --off } install(){ :; } |