diff --git a/scripts/upgrade b/scripts/upgrade index 3f51809..9a4bd69 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,6 +54,25 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# REMOVE OLD SERVICE INTEGRATION IN YUNOHOST +#================================================= + +# Remove the old service from the list of services known by YunoHost (added from `yunohost service add`) +if ynh_exec_warn_less yunohost service status "loolwsd" >/dev/null +then + ynh_script_progression --message="Removing loolwsd service integration..." --weight=1 + yunohost service remove "loolwsd" +fi + +#================================================= +# STOP AND REMOVE SERVICE +#================================================= +ynh_script_progression --message="Stopping and removing the old systemd service..." --weight=1 + +# Remove the dedicated systemd config +ynh_remove_systemd_config --service="loolwsd" + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -61,8 +80,6 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=5 -ynh_systemd_action --service_name="loolwsd" --action="stop" --log_path="systemd" --line_match="Stopped Collabora Online WebSocket Daemon" -ynh_systemd_action --service_name="loolwsd" --action="disable" --log_path="systemd" ynh_systemd_action --service_name="coolwsd" --action="stop" --log_path="systemd" --line_match="Stopped Collabora Online WebSocket Daemon" #=================================================