diff --git a/root/etc/e-smith/db/configuration/defaults/pydio/DbName b/root/etc/e-smith/db/configuration/defaults/pydio/DbName index 705e971..a923bd6 100644 --- a/root/etc/e-smith/db/configuration/defaults/pydio/DbName +++ b/root/etc/e-smith/db/configuration/defaults/pydio/DbName @@ -1 +1 @@ -ajaxplorer +pydio diff --git a/root/etc/e-smith/db/configuration/defaults/pydio/DbUser b/root/etc/e-smith/db/configuration/defaults/pydio/DbUser index 705e971..a923bd6 100644 --- a/root/etc/e-smith/db/configuration/defaults/pydio/DbUser +++ b/root/etc/e-smith/db/configuration/defaults/pydio/DbUser @@ -1 +1 @@ -ajaxplorer +pydio diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/pydio b/root/etc/e-smith/templates/etc/e-smith/sql/init/pydio index cadcd02..e32d4f3 100644 --- a/root/etc/e-smith/templates/etc/e-smith/sql/init/pydio +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/pydio @@ -8,10 +8,15 @@ my $feed = "/usr/share/pydio/plugins/feed.sql/create.sql"; $OUT .= <<"END"; #! /bin/sh if [ ! -d /var/lib/mysql/$db ]; then - /usr/bin/mysql -e 'create database $db' - /usr/bin/mysql $db < $feed + /usr/bin/mysql -e 'create database $db' + /usr/bin/mysql $db < $feed + if [ -e /var/lib/mysql/ajaxplorer ]; then + /usr/bin/mysqldump --add-drop-table ajaxplorer | /usr/bin/mysql $db + /usr/bin/mysqladmin -f drop ajaxplorer + fi fi + /usr/bin/mysql <