mirror of
https://github.com/YunoHost-Apps/pihole_ynh.git
synced 2024-09-03 20:05:58 +02:00
fix remove
This commit is contained in:
parent
452c6b664d
commit
e67f5f39c0
4 changed files with 9 additions and 13 deletions
|
@ -369,7 +369,8 @@ ynh_exec_warn_less /opt/pihole/gravity.sh
|
|||
cp ../conf/dnsmasq_regenconf_hook /usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
|
||||
|
||||
yunohost tools regen-conf dnsmasq
|
||||
systemctl daemon-reload
|
||||
ynh_exec_warn_less yunohost tools regen-conf dnsmasq
|
||||
|
||||
#=================================================
|
||||
# START PIHOLE-FTL
|
||||
|
|
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -196,7 +196,8 @@ ynh_script_progression --message="Restoring Dnsmasq config..."
|
|||
test -e "${YNH_APP_BACKUP_DIR}/etc/dnsmasq.d/03-pihole-wildcard.conf" && \
|
||||
ynh_restore_file --origin_path="/etc/dnsmasq.d/03-pihole-wildcard.conf"
|
||||
|
||||
yunohost tools regen-conf dnsmasq
|
||||
systemctl daemon-reload
|
||||
ynh_exec_warn_less yunohost tools regen-conf dnsmasq
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE DNS FOR THE LOCAL DOMAINS
|
||||
|
|
|
@ -368,7 +368,8 @@ yunohost service add pihole-FTL --description="PiHole backend service" --log="/v
|
|||
cp ../conf/dnsmasq_regenconf_hook /usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
|
||||
|
||||
yunohost tools regen-conf dnsmasq
|
||||
systemctl daemon-reload
|
||||
ynh_exec_warn_less yunohost tools regen-conf dnsmasq
|
||||
|
||||
#=================================================
|
||||
# START PIHOLE-FTL
|
||||
|
|
Loading…
Add table
Reference in a new issue