improve node gestion

This commit is contained in:
oiseauroch
2022-09-12 13:18:58 +02:00
parent abff1b3ce2
commit 8eaf3bf1b6
4 changed files with 53 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
#=================================================
@@ -139,6 +140,16 @@ ynh_script_progression --message="Starting a systemd service..." --time --weight
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# RECREATE CONFIGURATION
#=================================================
node_id=$(ynh_app_setting_get --app=$app --key=node_id)
weight=$(ynh_app_setting_get --app=$app --key=weight)
garage_command="$garage_path/garage -c $garage_path/garage.toml"
init_garage "$garage_command" "$node_id" "$weight" "$domain"
#=================================================
# GENERIC FINALIZATION
#=================================================