From 15726c5bc661c17600c59f2a4aed1015d22afda7 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 14 Sep 2021 19:39:14 +0200 Subject: [PATCH] fix 3.x --- scripts/actions/reset_default_app | 1 + scripts/install | 2 ++ scripts/remove | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/scripts/actions/reset_default_app b/scripts/actions/reset_default_app index 301406d..adbebb1 100755 --- a/scripts/actions/reset_default_app +++ b/scripts/actions/reset_default_app @@ -31,6 +31,7 @@ app=$YNH_APP_INSTANCE_NAME path_url=$(ynh_app_setting_get --app=$app --key=path) domain=$(ynh_app_setting_get --app=$app --key=domain) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) pihole_version="$(ynh_app_setting_get --app=$app --key=pihole_version)" #================================================= diff --git a/scripts/install b/scripts/install index 0608cd4..e1197f0 100644 --- a/scripts/install +++ b/scripts/install @@ -347,6 +347,8 @@ then ynh_script_progression --message="Restarting Dnsmasq..." --weight=2 ynh_systemd_action --action=restart --service_name=dnsmasq + + ynh_systemd_action --action=restart --service_name=pihole-FTL fi #================================================= diff --git a/scripts/remove b/scripts/remove index dc8cffa..0870673 100755 --- a/scripts/remove +++ b/scripts/remove @@ -188,6 +188,11 @@ ynh_systemd_action --action=restart --service_name=dnsmasq #================================================= ynh_script_progression --message="Removing the dedicated system user..." --weight=2 +if [ "$pihole_version" == "Last 3.X" ] +then + # Dirty hack to remove correctly the user + killall -u $app +fi ynh_system_user_delete --username=$app #=================================================