From 2ad7c49b2bd62e5d077a99a7c7d509b9dcdad2f2 Mon Sep 17 00:00:00 2001 From: Taekiro Date: Tue, 21 Dec 2021 09:59:10 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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" #=================================================