Handle the migration of the MySQL database from ajaxplorer to pydio

tags/0.2.0
Daniel Berteaud 11 years ago
parent e1e15054b3
commit 8d83cf1c31
  1. 2
      root/etc/e-smith/db/configuration/defaults/pydio/DbName
  2. 2
      root/etc/e-smith/db/configuration/defaults/pydio/DbUser
  3. 9
      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"; $OUT .= <<"END";
#! /bin/sh #! /bin/sh
if [ ! -d /var/lib/mysql/$db ]; then if [ ! -d /var/lib/mysql/$db ]; then
/usr/bin/mysql -e 'create database $db' /usr/bin/mysql -e 'create database $db'
/usr/bin/mysql $db < $feed /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 fi
/usr/bin/mysql <<EOF /usr/bin/mysql <<EOF
USE mysql; USE mysql;

Loading…
Cancel
Save