ne migrer sqlite vers mysql qu'à l'instance

This commit is contained in:
Emmanuel Garette 2019-02-19 09:18:57 +01:00
parent fb1bea8654
commit 6a75234cb8

View File

@ -6,6 +6,7 @@
# #
. /usr/lib/eole/ihm.sh . /usr/lib/eole/ihm.sh
script="$1"
function clean_backups() function clean_backups()
{ {
@ -42,7 +43,7 @@ function updateDB()
} }
function to_mysql() { function to_mysql() {
if [ $(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" "non" "warn"
rep=$(echo "$?") rep=$(echo "$?")
if [ "$rep" == "0" ]; then if [ "$rep" == "0" ]; then