Upgrade the database automatically

tags/smeserver-dl-0.2.1-1 0.1.1_el5
Daniel Berteaud 11 years ago
parent e71cf9a1eb
commit f5370c03bd
  1. 2
      root/etc/e-smith/templates/etc/e-smith/sql/init/dl

@ -10,6 +10,8 @@ $OUT .= <<"END";
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 < $dbstruct /usr/bin/mysql $db < $dbstruct
else
su -s /bin/bash - www -c "cd /usr/share/dl/include/scripts && /usr/bin/php ./dbupgrade.php"
fi fi
/usr/bin/mysql <<EOF /usr/bin/mysql <<EOF

Loading…
Cancel
Save