pma updated

Now we always install the latest pma version, instead of using the official Ubuntu PPA.
This commit is contained in:
Cristhian Martínez Ochoa 2018-06-23 20:18:42 -06:00
parent 7f0acd43ca
commit b0f743035e
2 changed files with 11 additions and 15 deletions

View file

@ -437,18 +437,18 @@ php_tool() {
mysql_tool() { mysql_tool() {
api-events_update im5 api-events_update im5
#PhpMyAdmin unattended script installation sudo mkdir /var/www/$(conf_read tools-port)/htdocs/pma
local AUTOGENPASS_PMA=`pwgen -s -1` sudo wget --timeout=15 -qrO /var/www/$(conf_read tools-port)/htdocs/pma.tar.xz https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.xz
echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | debconf-set-selections sudo tar -xf /var/www/$(conf_read tools-port)/htdocs/pma.tar.xz -C /var/www/$(conf_read tools-port)/htdocs/pma
echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | debconf-set-selections sudo mv /var/www/$(conf_read tools-port)/htdocs/pma/phpMyAdmin-*-all-languages/* /var/www/$(conf_read tools-port)/htdocs/pma/
echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENPASS_PMA" | debconf-set-selections sudo rm -rf /var/www/$(conf_read tools-port)/htdocs/pma/phpMyAdmin-*-all-languages
echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENPASS_PMA" | debconf-set-selections sudo rm -rf /var/www/$(conf_read tools-port)/htdocs/pma/test
sudo rm -rf /var/www/$(conf_read tools-port)/htdocs/pma/setup
sudo rm /var/www/$(conf_read tools-port)/htdocs/pma.tar.xz
#PhpMyAdmin Installation sudo cp /var/www/$(conf_read tools-port)/htdocs/pma/config.sample.inc.php /var/www/$(conf_read tools-port)/htdocs/pma/config.inc.php
pre_install sudo sed -i "/blowfish_secret/c \$cfg['blowfish_secret'] = '$(pwgen -s -1 32)';" /var/www/$(conf_read tools-port)/htdocs/pma/config.inc.php
sudo apt-get -y install phpmyadmin sudo chown -R www-data:www-data /var/www/
[[ -d /usr/share/phpmyadmin ]] && sudo mv /usr/share/phpmyadmin /var/www/$(conf_read tools-port)/htdocs/pma
conf_write mysql-tool true conf_write mysql-tool true
echo "${gre}PhpMyAdmin has been installed successfully! ${end}" echo "${gre}PhpMyAdmin has been installed successfully! ${end}"

View file

@ -261,10 +261,6 @@ elif [[ $arg == "-purge" && $opt == "-pma" ]]; then
fi fi
if [[ $answer == [Yy] || $(conf_read force-flag) == "true" || $(conf_read delautopma) == "true" ]]; then if [[ $answer == [Yy] || $(conf_read force-flag) == "true" || $(conf_read delautopma) == "true" ]]; then
echo "phpmyadmin phpmyadmin/dbconfig-remove boolean true" | debconf-set-selections
echo "phpmyadmin phpmyadmin/purge boolean true" | debconf-set-selections
sudo apt-get -y purge phpmyadmin
sudo apt-get -y autoremove
sudo rm -rf /var/www/$(conf_read tools-port)/htdocs/pma sudo rm -rf /var/www/$(conf_read tools-port)/htdocs/pma
conf_write mysql-tool purged conf_write mysql-tool purged
echo "" echo ""