|
@@ -39,15 +39,17 @@ domain=$(ynh_app_setting_get $app domain)
|
|
|
#=================================================
|
|
|
ynh_print_info "Stopping and removing services"
|
|
|
|
|
|
-yunohost service stop $service_checker_name
|
|
|
-yunohost service disable $service_checker_name
|
|
|
-yunohost service remove $service_checker_name
|
|
|
+systemctl stop $service_checker_name
|
|
|
+systemctl disable $service_checker_name
|
|
|
systemctl stop $service_checker_name.timer && sleep 1
|
|
|
systemctl disable $service_checker_name.timer
|
|
|
|
|
|
-yunohost service stop $service_name
|
|
|
-yunohost service disable $service_name
|
|
|
-yunohost service remove $service_name
|
|
|
+if ynh_exec_warn_less yunohost service status $service_name >/dev/null
|
|
|
+then
|
|
|
+ yunohost service stop $service_name
|
|
|
+ yunohost service disable $service_name
|
|
|
+ yunohost service remove $service_checker
|
|
|
+fi
|
|
|
|
|
|
for FILE in $(ls /etc/systemd/system/$service_name* /usr/local/bin/ynh-vpnclient* /tmp/.ynh-vpnclient-*)
|
|
|
do
|