Skip to content

Commit

Permalink
changed mysql config file location
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Jul 7, 2017
1 parent a98bf79 commit 33e01e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/nextcloudpi-config.d/nc-database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ or the database will fail.

configure()
{
local SRCDIR=$( grep datadir /etc/mysql/my.cnf | cut -d= -f2 )
local SRCDIR=$( grep datadir /etc/mysql/mariadb.conf.d/50-server.cnf | cut -d= -f2 )
[ -d $SRCDIR ] || { echo -e "database directory $SRCDIR not found"; return 1; }

[ -d "$DBDIR_" ] && {
Expand All @@ -61,7 +61,7 @@ configure()
service mysql stop

mv $SRCDIR "$DBDIR_" || return 1
sed -i "s|^datadir.*|datadir = $DBDIR_|" /etc/mysql/my.cnf
sed -i "s|^datadir.*|datadir = $DBDIR_|" /etc/mysql/mariadb.conf.d/50-server.cnf

service mysql start && service apache2 start
}
Expand Down

0 comments on commit 33e01e7

Please sign in to comment.