From 3e8913dcc7940e837bd2689c31e158c873950940 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 19 Jan 2015 20:39:14 +0100 Subject: [PATCH] Update phpmyadmin installation --- lamp-precise64/bootstrap.sh | 16 ++++++++++------ lamp-trusty64/bootstrap.sh | 13 +++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lamp-precise64/bootstrap.sh b/lamp-precise64/bootstrap.sh index dd76216..a1b988a 100644 --- a/lamp-precise64/bootstrap.sh +++ b/lamp-precise64/bootstrap.sh @@ -38,15 +38,19 @@ then sudo touch /etc/mysql/vagrant fi -# Installation phpMyAdmin +# --- Installation phpMyAdmin PHPMYADMIN_VERSION="4.3.7" -if [ ! -d "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" ] +PHPMYADMIN_PATH="phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" +if [ ! -d "/home/vhosts/$PHPMYADMIN_PATH" ] then - if [ -f "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ] + if [ -f "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" ] then - unzip "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/ - mysql -hlocalhost -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql" - cp /vagrant/data/Apps/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/" + tar xJvf "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" --directory /home/vhosts/ + mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql + mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/$PHPMYADMIN_PATH/examples/create_tables.sql + sudo service mysql restart + cp /vagrant/data/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_PATH/ + chmod 0444 /home/vhosts/$PHPMYADMIN_PATH/config.inc.php fi fi diff --git a/lamp-trusty64/bootstrap.sh b/lamp-trusty64/bootstrap.sh index 571fdc1..6ef1fa3 100644 --- a/lamp-trusty64/bootstrap.sh +++ b/lamp-trusty64/bootstrap.sh @@ -38,16 +38,17 @@ fi # --- Installation phpMyAdmin PHPMYADMIN_VERSION="4.3.7" -if [ ! -d "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" ] +PHPMYADMIN_PATH="phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" +if [ ! -d "/home/vhosts/$PHPMYADMIN_PATH" ] then - if [ -f "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ] + if [ -f "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" ] then - unzip "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/ + tar xJvf "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" --directory /home/vhosts/ mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql - mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql + mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/$PHPMYADMIN_PATH/examples/create_tables.sql sudo service mysql restart - cp /vagrant/data/Apps/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/" - chmod 0444 /home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/config.inc.php + cp /vagrant/data/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_PATH/ + chmod 0444 /home/vhosts/$PHPMYADMIN_PATH/config.inc.php fi fi