Rename '/etc/mysql/my.cnf' if present and MySQL was not installed from debian package system.

This commit is contained in:
Christoph 2018-04-12 15:39:28 +02:00
parent a740e6242d
commit bb165b2c8b

View File

@ -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<<EOF