From 1a04270c9db41375ef7c579a5c105b97363f0cfa Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 16 Oct 2022 01:38:07 +0200 Subject: [PATCH] Update demo_switch.sh --- demo_switch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo_switch.sh b/demo_switch.sh index 524a98b..771c8ce 100755 --- a/demo_switch.sh +++ b/demo_switch.sh @@ -17,14 +17,14 @@ lxc_ip1=$(ynh_app_setting_get --app=$app --key=lxc_ip1) lxc_ip2=$(ynh_app_setting_get --app=$app --key=lxc_ip2) lxc_name1=$(ynh_app_setting_get --app=$app --key=lxc_name1) lxc_name2=$(ynh_app_setting_get --app=$app --key=lxc_name2) -domain=${$(ynh_app_setting_get --app=$app --key=domain):-$(cat "$final_path/domain.ini")} +domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) log_line=$(wc -l "$final_path/demo_switch.log" | cut -d ' ' -f 1) # Repère la fin du log actuel. Pour récupérer les lignes ajoutées sur cette exécution. log_line=$(( $log_line + 1 )) # Ignore la première ligne, reprise de l'ancien log. date | tee -a "$final_path/demo_switch.log" 2>&1 -ynh_print_info --message=">> Switching demo." | tee -a "$final_path/demo_switch.log" 2>&1 +ynh_print_info --message=">> Start switching demo." | tee -a "$final_path/demo_switch.log" 2>&1 while test -e /var/lib/lxd/$lxc_name1.lock_file* || test -e /var/lib/lxd/$lxc_name2.lock_file*; do sleep 5 # Attend que le conteneur soit libéré par les script upgrade ou switch, le cas échéant.