|
|
@@ -151,11 +151,8 @@ ynh_secure_remove --file="/etc/sudoers.d/pihole"
|
|
|
#=================================================
|
|
|
ynh_script_progression --message="Removing Dnsmasq config..." --weight=2
|
|
|
|
|
|
-ynh_systemd_action --action=stop --service_name=dnsmasq
|
|
|
ynh_secure_remove --file="/etc/dnsmasq.d/03-pihole-wildcard.conf"
|
|
|
|
|
|
-ynh_replace_string --match_string="#pihole# " --replace_string="" --target_file=/etc/dnsmasq.conf
|
|
|
-
|
|
|
#=================================================
|
|
|
# CLEAN /etc/hosts
|
|
|
#=================================================
|
|
|
@@ -171,21 +168,17 @@ sed -i "/#Added by pihole#/d" /etc/hosts
|
|
|
# REMOVE CONF_REGEN HOOK
|
|
|
#=================================================
|
|
|
|
|
|
+ynh_systemd_action --action=stop --service_name=dnsmasq
|
|
|
+
|
|
|
ynh_secure_remove --file=/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
|
|
|
|
|
|
-yunohost tools regen-conf dnsmasq
|
|
|
+ynh_exec_warn_less yunohost tools regen-conf dnsmasq
|
|
|
|
|
|
#=================================================
|
|
|
# RESTART DNSMASQ
|
|
|
#=================================================
|
|
|
ynh_script_progression --message="Restarting Dnsmasq..."
|
|
|
|
|
|
-if [ "$pihole_version" == "Last available" ]
|
|
|
-then
|
|
|
- # Quietly start dnsmasq a first time, because it usually doesn't start correctly the first time.
|
|
|
- ynh_exec_fully_quiet systemctl start dnsmasq
|
|
|
- sleep 1
|
|
|
-fi
|
|
|
ynh_systemd_action --action=restart --service_name=dnsmasq
|
|
|
|
|
|
#=================================================
|