[fx] Update dbserver default following my.cnf value
In some case alternc/my.cnf can divege with values stored db_server. my.cnf is authorative then we update db_server data in any case
This commit is contained in:
parent
bd60767088
commit
53c516a59d
|
@ -572,6 +572,14 @@ if [ "$HAS_ROOT" != "1" ]; then
|
||||||
else
|
else
|
||||||
echo "Unable to create the first AlternC account (named 'admin'). newone.php returned $?. Check your MySQL database, PHP, and the /etc/alternc/local.sh file. Also check for any error above during install."
|
echo "Unable to create the first AlternC account (named 'admin'). newone.php returned $?. Check your MySQL database, PHP, and the /etc/alternc/local.sh file. Also check for any error above during install."
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
##UPDATE default db_server following /etc/alternc/my.cnf values
|
||||||
|
if [ "$MYSQL_HOST" == "localhost" ]; then
|
||||||
|
MYSQL_HOST_CLIENT="localhost"
|
||||||
|
else
|
||||||
|
MYSQL_HOST_CLIENT="%"
|
||||||
|
fi
|
||||||
|
mysql --defaults-file=/etc/alternc/my.cnf -e "UPDATE db_servers SET host='$MYSQL_HOST', login='$MYSQL_USER', password='$MYSQL_PASS', client='$MYSQL_HOST_CLIENT' WHERE name='Default';"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#giving vmail user read access on dovecot sql file
|
#giving vmail user read access on dovecot sql file
|
||||||
|
|
|
@ -582,6 +582,14 @@ if [ "$HAS_ROOT" != "1" ]; then
|
||||||
else
|
else
|
||||||
echo "Unable to create the first AlternC account (named 'admin'). newone.php returned $?. Check your MySQL database, PHP, and the /etc/alternc/local.sh file. Also check for any error above during install."
|
echo "Unable to create the first AlternC account (named 'admin'). newone.php returned $?. Check your MySQL database, PHP, and the /etc/alternc/local.sh file. Also check for any error above during install."
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
##UPDATE default db_server following /etc/alternc/my.cnf values
|
||||||
|
if [ "$MYSQL_HOST" == "localhost" ]; then
|
||||||
|
MYSQL_HOST_CLIENT="localhost"
|
||||||
|
else
|
||||||
|
MYSQL_HOST_CLIENT="%"
|
||||||
|
fi
|
||||||
|
mysql --defaults-file=/etc/alternc/my.cnf -e "UPDATE db_servers SET host='$MYSQL_HOST', login='$MYSQL_USER', password='$MYSQL_PASS', client='$MYSQL_HOST_CLIENT' WHERE name='Default';"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# giving vmail user read access on dovecot sql file
|
# giving vmail user read access on dovecot sql file
|
||||||
|
|
Loading…
Reference in New Issue