From bb165b2c8b6dfec53033dc3cda2fdab7cd2165db Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 12 Apr 2018 15:39:28 +0200 Subject: [PATCH] Rename '/etc/mysql/my.cnf' if present and MySQL was not installed from debian package system. --- mod_php_install.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mod_php_install.sh b/mod_php_install.sh index 7cc669e..bb83cc6 100755 --- a/mod_php_install.sh +++ b/mod_php_install.sh @@ -3333,6 +3333,25 @@ if $ACTIVATE_PHP_FPM_INIT_SCRIPT ; then fi +## ----- +## - Rename /etc/mysql/my.cnf if MySQL was not installed from debian package system. +## ----- + +if [[ -d "/usr/local/mysql" ]]; then + if [[ -f "/etc/mysql/my.cnf" ]]; then + echo + echononl "\tRename '/etc/mysql/my.cnf' to '/etc/mysql/my.cnf.DEBIAN'.." + mv "/etc/mysql/my.cnf" "/etc/mysql/my.cnf.DEBIAN" > $tmp_err_msg 2>&1 + if [[ $? -eq 0 ]]; then + echo_ok + else + echo_failed + error "$(cat $tmp_err_msg)" + fi + fi +fi + + cd $pwd cat<