[fix] debian debconf settings for mysql : read from /etc/alternc/my.cnf
This commit is contained in:
parent
4b0f852845
commit
1be8bc16d4
|
@ -105,6 +105,13 @@ QUEST_STATE=1
|
||||||
while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
case "$QUEST_STATE" in
|
case "$QUEST_STATE" in
|
||||||
1)
|
1)
|
||||||
|
if [ -r /etc/alternc/my.cnf ]; then
|
||||||
|
MYSQL_USER=$(cat /etc/alternc/my.cnf |grep "^user"|sed -r 's/user="(.*)"/\1/');
|
||||||
|
MYSQL_PASSWORD=$(cat /etc/alternc/my.cnf |grep "^password"|sed -r 's/password="(.*)"/\1/');
|
||||||
|
MYSQL_DATABASE=$(cat /etc/alternc/my.cnf |grep "^database"|sed -r 's/database="(.*)"/\1/');
|
||||||
|
MYSQL_HOST=$(cat /etc/alternc/my.cnf |grep "^host"|sed -r 's/host="(.*)"/\1/');
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -r /etc/alternc/local.sh ]; then
|
if [ -r /etc/alternc/local.sh ]; then
|
||||||
# source the current config
|
# source the current config
|
||||||
. /etc/alternc/local.sh
|
. /etc/alternc/local.sh
|
||||||
|
@ -121,10 +128,6 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
db_set alternc/alternc_logs "$ALTERNC_LOGS"
|
db_set alternc/alternc_logs "$ALTERNC_LOGS"
|
||||||
db_set alternc/monitor_ip "$MONITOR_IP"
|
db_set alternc/monitor_ip "$MONITOR_IP"
|
||||||
db_set alternc/default_mx2 "$DEFAULT_SECONDARY_MX"
|
db_set alternc/default_mx2 "$DEFAULT_SECONDARY_MX"
|
||||||
db_set alternc/mysql/host "$MYSQL_HOST"
|
|
||||||
db_set alternc/mysql/db "$MYSQL_DATABASE"
|
|
||||||
db_set alternc/mysql/user "$MYSQL_USER"
|
|
||||||
db_set alternc/mysql/password "$MYSQL_PASS"
|
|
||||||
db_set alternc/mysql/client "$MYSQL_CLIENT"
|
db_set alternc/mysql/client "$MYSQL_CLIENT"
|
||||||
db_set alternc/sql/backup_type "$SQLBACKUP_TYPE"
|
db_set alternc/sql/backup_type "$SQLBACKUP_TYPE"
|
||||||
db_set alternc/sql/backup_overwrite "$SQLBACKUP_OVERWRITE"
|
db_set alternc/sql/backup_overwrite "$SQLBACKUP_OVERWRITE"
|
||||||
|
|
Loading…
Reference in New Issue