13 lines
521 B
Plaintext
Executable File
13 lines
521 B
Plaintext
Executable File
SERVER=$(CreoleGet one_master)
|
|
IP=$(CreoleGet adresse_ip_eth0)
|
|
if [ $(CreoleGet one_database_type) = "mysql" && $(CreoleGet one_ha_role) = "leader" ]; then
|
|
HOST=$(CreoleGet one_database_host)
|
|
DB=$(CreoleGet one_database_name)
|
|
USER=$(CreoleGet one_database_user)
|
|
PASS=$(CreoleGet one_database_pass)
|
|
onedb sqlite2mysql -s /var/lib/one/one.db -u $USER -p $PASS -d $DB -S $HOST
|
|
systemctl stop opennebula
|
|
systemctl start opennebula
|
|
fi
|
|
onezone server-add 0 --name $SERVER --rpc http://$IP:2633/RPC2
|