From 1060ee5d802309b2ebc1d8d75800b542610916b9 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Tue, 6 Apr 2021 16:06:45 -0400 Subject: [PATCH] Fix service integration removal --- scripts/remove | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index 88ad86b..e2cbdf3 100755 --- a/scripts/remove +++ b/scripts/remove @@ -29,13 +29,22 @@ data_path=$(ynh_app_setting_get --app=$app --key=data_path) # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= +ynh_script_progression --message="Removing $app services integration..." --weight=1 + # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) -if ynh_exec_warn_less yunohost service status $app >/dev/null -then - ynh_script_progression --message="Removing $app service integration..." --weight=1 +if ynh_exec_warn_less yunohost service status $app-backend >/dev/null ; then yunohost service remove $app-backend +fi + +if ynh_exec_warn_less yunohost service status $app-frontend >/dev/null ; then yunohost service remove $app-frontend +fi + +if ynh_exec_warn_less yunohost service status $app-image-similarity >/dev/null ; then yunohost service remove $app-image-similarity +fi + +if ynh_exec_warn_less yunohost service status $app-worker >/dev/null ; then yunohost service remove $app-worker fi