diff --git a/scripts/upgrade b/scripts/upgrade index 8322922..717b03b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,6 +74,12 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +if ynh_exec_warn_less yunohost service status $app >/dev/null +then + ynh_script_progression --message="Removing $app service integration..." + yunohost service remove $app +fi + ynh_remove_logrotate ynh_remove_supervisor_config @@ -172,8 +178,8 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st ynh_script_progression --message="Upgrading systemd configuration..." # Create a dedicated systemd config -ynh_systemd_action --service_name=${app}-app --action="start" --log_path=systemd --line_match="Listening on" -ynh_systemd_action --service_name=${app}-worker --action="start" --log_path=systemd --line_match="Schedules Loaded" +ynh_add_systemd_config --service="$app-app" --template="fab-manager-app.service" +ynh_add_systemd_config --service="$app-worker" --template="fab-manager-worker.service" #================================================= # GENERIC FINALIZATION