Merge branch 'develop' into dist/eole/2.7.0/develop
This commit is contained in:
commit
a4b20fe2ba
|
@ -44,7 +44,7 @@ function updateDB()
|
||||||
|
|
||||||
function to_mysql() {
|
function to_mysql() {
|
||||||
if [ "$script" = 'instance' ] && [ $(CreoleGet one_database_type) = "mysql" ] && [ $(CreoleGet one_ha_role leader) = "leader" ]; then
|
if [ "$script" = 'instance' ] && [ $(CreoleGet one_database_type) = "mysql" ] && [ $(CreoleGet one_ha_role leader) = "leader" ]; then
|
||||||
Question_ouinon "Voulez-vous migrer de SQLite à Mysql ?" "True" "non" "warn"
|
Question_ouinon "Voulez-vous migrer de SQLite à Mysql ?" "True" "oui" "warn"
|
||||||
rep=$(echo "$?")
|
rep=$(echo "$?")
|
||||||
if [ "$rep" == "0" ]; then
|
if [ "$rep" == "0" ]; then
|
||||||
# do not recover db on follower
|
# do not recover db on follower
|
||||||
|
@ -52,7 +52,12 @@ function to_mysql() {
|
||||||
DB=$(CreoleGet one_database_name)
|
DB=$(CreoleGet one_database_name)
|
||||||
USER=$(CreoleGet one_database_user)
|
USER=$(CreoleGet one_database_user)
|
||||||
PASS=$(CreoleGet one_database_pass)
|
PASS=$(CreoleGet one_database_pass)
|
||||||
|
cp -a /etc/one/oned.conf /etc/one/oned.conf.ori
|
||||||
|
# HA ne doit pas être activer pour la migration
|
||||||
|
CreoleCat -s /usr/share/eole/creole/distrib/oned-ha-mysql.conf -o /etc/one/oned.conf
|
||||||
|
oned -i
|
||||||
onedb sqlite2mysql -s /var/lib/one/one.db -u $USER -p $PASS -d $DB -S $HOST
|
onedb sqlite2mysql -s /var/lib/one/one.db -u $USER -p $PASS -d $DB -S $HOST
|
||||||
|
cp -a /etc/one/oned.conf.ori /etc/one/oned.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
%set global %%enable_one_ha='non'
|
||||||
|
%include '/var/lib/creole/oned.conf'
|
Loading…
Reference in New Issue