Skip to content

Commit

Permalink
nc-database: fail gracefully if mv fails
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Aug 14, 2017
1 parent 7dde92a commit 9176473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/nextcloudpi-config.d/nc-database.sh
Expand Up @@ -62,8 +62,8 @@ configure()

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
mv $SRCDIR "$DBDIR_" && \
sed -i "s|^datadir.*|datadir = $DBDIR_|" /etc/mysql/mariadb.conf.d/50-server.cnf
service mysql start

sudo -u www-data php occ maintenance:mode --off
Expand Down

0 comments on commit 9176473

Please sign in to comment.