From f5370c03bdd84180828dae5d9a5c30adc41cd032 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 24 Nov 2013 14:22:32 +0100 Subject: [PATCH] Upgrade the database automatically --- root/etc/e-smith/templates/etc/e-smith/sql/init/dl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/dl b/root/etc/e-smith/templates/etc/e-smith/sql/init/dl index e022ad7..b685cd1 100644 --- a/root/etc/e-smith/templates/etc/e-smith/sql/init/dl +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/dl @@ -10,6 +10,8 @@ $OUT .= <<"END"; if [ ! -d /var/lib/mysql/$db ]; then /usr/bin/mysql -e 'create database $db' /usr/bin/mysql $db < $dbstruct +else + su -s /bin/bash - www -c "cd /usr/share/dl/include/scripts && /usr/bin/php ./dbupgrade.php" fi /usr/bin/mysql <