Kay0u 4 years ago
parent
commit
15726c5bc6
3 changed files with 8 additions and 0 deletions
  1. 1 0
      scripts/actions/reset_default_app
  2. 2 0
      scripts/install
  3. 5 0
      scripts/remove

+ 1 - 0
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)"
 
 #=================================================

+ 2 - 0
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
 
 #=================================================

+ 5 - 0
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
 
 #=================================================