From dbd4c7b4601fb8afd46692f23f2685dfdc0b630d Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 22 Sep 2014 19:09:51 +0530 Subject: [PATCH] Fixed percona-mysql remove/purge and also log mysqladmin ping messages --- bin/easyengine | 2 +- bin/update | 2 +- src/modules/stack/install/ee_mod_install_mysql.sh | 6 +++--- src/modules/stack/remove/ee_mod_remove_mysql.sh | 6 +++--- src/vendor/ee_ven_install_utils.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index 3bfdca74..9a3fa10d 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -140,7 +140,7 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then # Check required Packages are installed or not dpkg --get-selections | grep -v deinstall | grep nginx > /dev/null \ && dpkg --get-selections | grep -v deinstall | grep php5-fpm > /dev/null \ - && mysqladmin ping &> /dev/null \ + && mysqladmin ping &>> $EE_COMMAND_LOG \ && dpkg --get-selections | grep -v deinstall | grep postfix > /dev/null if [ $? -ne 0 ];then ee_lib_error "Failed to find NGINX PHP MySQL Postfix, exit status=" 1 diff --git a/bin/update b/bin/update index ae78248b..5136b981 100644 --- a/bin/update +++ b/bin/update @@ -325,7 +325,7 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then || ee_lib_error "Unable to add xdebug settings for debug pool, exit status = " $? fi - dpkg --get-selections | grep -v deinstall | grep mysql-server &>> $EE_UPDATE_LOG + mysqladmin ping &> /dev/null &>> $EE_UPDATE_LOG if [ $? -eq 0 ]; then ee_lib_echo "Installing percona-toolkit package, please wait..." apt-get -y install percona-toolkit \ diff --git a/src/modules/stack/install/ee_mod_install_mysql.sh b/src/modules/stack/install/ee_mod_install_mysql.sh index 23b877a5..c3f9242f 100644 --- a/src/modules/stack/install/ee_mod_install_mysql.sh +++ b/src/modules/stack/install/ee_mod_install_mysql.sh @@ -5,10 +5,10 @@ ee_mod_install_mysql() # Random characters local ee_random=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15 | head -n1) - # Check MySQL is installed or not - ee_lib_package_check mysql-server + # Check Percona MySQL is installed or not + ee_lib_package_check percona-server-server-5.6 - # If MySQL is not installed + # If Percona MySQL is not installed # Then set random MySQL password for root user if [ -n "$EE_PACKAGE_NAME" ]; then diff --git a/src/modules/stack/remove/ee_mod_remove_mysql.sh b/src/modules/stack/remove/ee_mod_remove_mysql.sh index 628bc9e6..e018baf5 100644 --- a/src/modules/stack/remove/ee_mod_remove_mysql.sh +++ b/src/modules/stack/remove/ee_mod_remove_mysql.sh @@ -2,9 +2,9 @@ function ee_mod_remove_mysql() { - ee_lib_echo "$EE_SECOND MySQL package, please wait..." - $EE_APT_GET $EE_SECOND mysql-server mysqltuner percona-toolkit \ - || ee_lib_error "Unable to $EE_SECOND MySQL, exit status = " $? + ee_lib_echo "$EE_SECOND Percona MySQL package, please wait..." + $EE_APT_GET $EE_SECOND percona-server-server-5.6 mysqltuner percona-toolkit \ + || ee_lib_error "Unable to $EE_SECOND Percona MySQL, exit status = " $? # Remove tuning-primer.sh rm -f /usr/local/bin/tuning-primer.sh diff --git a/src/vendor/ee_ven_install_utils.sh b/src/vendor/ee_ven_install_utils.sh index 63275b72..c40a63e1 100644 --- a/src/vendor/ee_ven_install_utils.sh +++ b/src/vendor/ee_ven_install_utils.sh @@ -70,7 +70,7 @@ function ee_ven_install_utils() # phpinfo() echo -e "" &>> /var/www/22222/htdocs/php/info.php fi - mysqladmin ping &> /dev/null + mysqladmin ping &>> $EE_COMMAND_LOG if [ $? -eq 0 ]; then # Setup Anemometer if [ ! -d /var/www/22222/htdocs/db/anemometer ]; then