This commit is contained in:
keoma
2019-02-24 21:41:06 +01:00
parent c3970ac8d9
commit 7646ffbb28
6 changed files with 83 additions and 100 deletions

View File

@@ -33,16 +33,24 @@ source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
service_name="ynh-vpnclient"
service_checker_name=$service_name"-checker"
#=================================================
# The End
ynh_systemctl stop ynh-vpnclient-checker.service
systemctl disable ynh-vpnclient-checker.service
ynh_systemctl stop ynh-vpnclient-checker.timer && sleep 1
systemctl disable ynh-vpnclient-checker.timer
ynh_systemctl stop ynh-vpnclient
systemctl disable ynh-vpnclient
yunohost service remove ynh-vpnclient
for FILE in $(ls /etc/systemd/system/ynh-vpnclient* /usr/local/bin/ynh-vpnclient* /tmp/.ynh-vpnclient-*)
# Stop and remove yunohost services
yunohost service stop $service_checker_name
yunohost service disable $service_checker_name
yunohost service remove $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
for FILE in $(ls /etc/systemd/system/$service_name* /usr/local/bin/ynh-vpnclient* /tmp/.ynh-vpnclient-*)
do
ynh_secure_remove "$FILE"
done
@@ -65,6 +73,9 @@ ynh_remove_app_dependencies
# Remove sources
ynh_secure_remove "/var/www/${app}"
# Reload systemd configuration
systemctl daemon-reload
# Restart services
# (this must happen before deleting the user, otherwise the user is
# being used by one of the php pool process)