diff --git a/scripts/upgrade b/scripts/upgrade index 049e84d..2fd4bfd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -251,6 +251,22 @@ pushd "$final_path" ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile popd +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." + +# Create a dedicated systemd config +ynh_add_systemd_config + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." + +# Start a systemd service +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP server listening on localhost" + #================================================= # INSTALL LDAP PLUGIN #================================================= @@ -272,12 +288,12 @@ if ynh_compare_current_package_version --comparison lt --version 4.0.0~ynh1; the fi #================================================= -# SETUP SYSTEMD +# STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." +ynh_script_progression --message="Stopping a systemd service..." -# Create a dedicated systemd config -ynh_add_systemd_config +# Stop a systemd service +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # GENERIC FINALIZATION