From 45f4d7cda8f995a51f8ce6acb92eda615a3a9b26 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 18 Sep 2022 14:18:30 +0200 Subject: [PATCH] Fix SET UP CONF_REGEN HOOK --- scripts/actions/reset_default_app | 3 ++- scripts/install | 3 ++- scripts/upgrade | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/actions/reset_default_app b/scripts/actions/reset_default_app index fd3b9e4..4bcce48 100755 --- a/scripts/actions/reset_default_app +++ b/scripts/actions/reset_default_app @@ -191,7 +191,8 @@ ynh_replace_string --match_string=".*updatechecker.*" --replace_string="#&" --ta ( cd scripts - ynh_add_config --template="../conf/dnsmasq_regenconf_hook" --destination="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app" + 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" ) #================================================= diff --git a/scripts/install b/scripts/install index af74912..20dc843 100644 --- a/scripts/install +++ b/scripts/install @@ -308,7 +308,8 @@ echo "$(ynh_app_upstream_version) $pihole_adminlte_version $pihole_flt_version" #================================================= ynh_script_progression --message="Setting up conf_regen hook..." --weight=1 -ynh_add_config --template="../conf/dnsmasq_regenconf_hook" --destination="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app" +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" systemctl daemon-reload ynh_exec_warn_less yunohost tools regen-conf dnsmasq diff --git a/scripts/upgrade b/scripts/upgrade index 9a0a858..94253e2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -375,7 +375,8 @@ echo "$(ynh_app_upstream_version) $pihole_adminlte_version $pihole_flt_version" #================================================= ynh_script_progression --message="Updating conf_regen hook..." --weight=1 -ynh_add_config --template="../conf/dnsmasq_regenconf_hook" --destination="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app" +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" systemctl daemon-reload ynh_exec_warn_less yunohost tools regen-conf dnsmasq