diff --git a/scripts/install b/scripts/install index e512b27..f28c01d 100755 --- a/scripts/install +++ b/scripts/install @@ -377,7 +377,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ### - And the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the change_url script # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="INFO netapp::netapp: Listening on" #================================================= @@ -405,6 +405,12 @@ ynh_script_progression --message="Configuring garage..." --weight=1 garage_command="$final_path/garage -c $final_path/garage.toml" node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1) +# sometimes server need some time to start +if [ -n "$node_id" ] +then + sleep 5 + node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1) +fi ynh_app_setting_set --app=$app --key=node_id --value=$node_id diff --git a/scripts/restore b/scripts/restore index 2897727..13e0723 100755 --- a/scripts/restore +++ b/scripts/restore @@ -148,7 +148,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 #recreate log folder mkdir /var/log/$app -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="INFO netapp::netapp: Listening on" #================================================= # RECREATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 20c7b2a..c58c054 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -185,7 +185,7 @@ yunohost service add --needs_exposed_ports $port --description="s3 storage" --lo #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="INFO netapp::netapp: Listening on" #================================================= # RELOAD NGINX