From 97239690179fa5f95b771b435d7da115550f2e2c Mon Sep 17 00:00:00 2001 From: Camille Lafitte Date: Fri, 3 Nov 2023 10:04:35 +0100 Subject: [PATCH] Fix #247 * Missing backport from koumbit/pu --- install/alternc.install | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/alternc.install b/install/alternc.install index 55638a6c..5b40707a 100755 --- a/install/alternc.install +++ b/install/alternc.install @@ -213,8 +213,7 @@ if [ -r /etc/alternc/my.cnf ]; then # * add a right quote operator at the end of line (;s) # * convert mysql variables into our MYSQL_ naming convention (;s) # * print the result (;p) - MYSQL_PASS_ESC=$(echo "$MYSQL_PASS" | sed -e 's/[\/&^$]/\\&/g') - eval `sed -n -e "/=/{s/ *= *\"\?/='/;s/\"\?\$/'/;s/host/MYSQL_HOST/;s/user/MYSQL_USER/;s/password/MYSQL_PASS_ESC/;s/database/MYSQL_DATABASE/;p}" /etc/alternc/my.cnf` + eval `sed -n -e "/=/{s/ *= *\"\?/='/;s/\"\?\$/'/;s/host/MYSQL_HOST/;s/user/MYSQL_USER/;s/password/MYSQL_PASS/;s/database/MYSQL_DATABASE/;p}" /etc/alternc/my.cnf` chown root:alterncpanel /etc/alternc/my.cnf chmod 640 /etc/alternc/my.cnf fi @@ -227,8 +226,7 @@ if [ -r /etc/alternc/my_mail.cnf ]; then # * add a right quote operator at the end of line (;s) # * convert mysql variables into our MYSQL_ naming convention (;s) # * print the result (;p) - MYSQL_MAIL_PASS_ESC=$(echo "$MYSQL_MAIL_PASS" | sed -e 's/[\/&^$]/\\&/g') - eval `sed -n -e "/=/{s/ *= *\"\?/='/;s/\"\?\$/'/;s/host/MYSQL_HOST/;s/user/MYSQL_MAIL_USER/;s/password/MYSQL_MAIL_PASS_ESC/;s/database/MYSQL_DATABASE/;p}" /etc/alternc/my_mail.cnf` + eval `sed -n -e "/=/{s/ *= *\"\?/='/;s/\"\?\$/'/;s/host/MYSQL_HOST/;s/user/MYSQL_MAIL_USER/;s/password/MYSQL_MAIL_PASS/;s/database/MYSQL_DATABASE/;p}" /etc/alternc/my_mail.cnf` chown root:alterncpanel /etc/alternc/my_mail.cnf chmod 640 /etc/alternc/my_mail.cnf fi