From 097db176f6e1476f6dea691541b3328085461458 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 21 Sep 2021 12:44:01 +0200 Subject: [PATCH 1/6] fix dnsmasq regenconf --- conf/dnsmasq_regenconf_hook | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/dnsmasq_regenconf_hook b/conf/dnsmasq_regenconf_hook index bc8fd2a..0af8f3f 100755 --- a/conf/dnsmasq_regenconf_hook +++ b/conf/dnsmasq_regenconf_hook @@ -22,6 +22,7 @@ ynh_replace_string --match_string="@DNS1@" --replace_string="" --target_file="$d ynh_replace_string --match_string="@DNS2@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="^no-resolv" --replace_string="#no-resolv" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="@INT@" --replace_string="$main_iface" --target_file="$dnsmasq_dir/01-pihole.conf" +ynh_replace_string --match_string="@cache-size@" --replace_string="1000" --target_file="$dnsmasq_dir/01-pihole.conf" query_logging=$(ynh_app_setting_get --app=$app --key=query_logging) if [ "$query_logging" = "true" ]; then ynh_replace_string --match_string="^#log-queries" --replace_string="log-queries" --target_file="$dnsmasq_dir/01-pihole.conf" @@ -34,6 +35,9 @@ fi # ynh_replace_string --match_string="^cache-size=" --replace_string="#pihole# cache-size=" --target_file="${pending_conf}/etc/dnsmasq.conf" +ynh_replace_string --match_string="^listen-address=" --replace_string="#pihole# cache-size=" --target_file="${pending_conf}/etc/dnsmasq.conf" + +echo "conf-dir=/etc/dnsmasq.d/" >> "${pending_conf}/etc/dnsmasq.conf" # # Regen /etc/dnsmasq.d/02-pihole-dhcp.conf From 56baee57881b20ff191ddd0929cf43fde33cd3fb Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 21 Sep 2021 13:14:11 +0200 Subject: [PATCH 2/6] upgrade versions --- conf/FTL_last.src | 4 ++-- conf/admin_dashboard_last.src | 4 ++-- conf/app_last.src | 4 ++-- scripts/_variables | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/conf/FTL_last.src b/conf/FTL_last.src index 463dd0c..6df921c 100644 --- a/conf/FTL_last.src +++ b/conf/FTL_last.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.8.1.tar.gz -SOURCE_SUM=6177f775a8d0be703b235741befe90b6192bdc0baab5a6e028019a9af00a44ae +SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.9.tar.gz +SOURCE_SUM=e10009f57a52434c70f6ca3abcac01b8a6a4365b8b257e9d1bdd2f6c3d509bc2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/admin_dashboard_last.src b/conf/admin_dashboard_last.src index 0e3c61c..26ca810 100644 --- a/conf/admin_dashboard_last.src +++ b/conf/admin_dashboard_last.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.5.tar.gz -SOURCE_SUM=39340eeb115732db7cf96166dfa9c7240afb0843b4f49defc42e704b751cf278 +SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.6.tar.gz +SOURCE_SUM=1b959de820fa9fb39999f5244a0201d26a1df9846ad3151dc6d66dd8fdda92dd SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app_last.src b/conf/app_last.src index efeaefa..593a63c 100644 --- a/conf/app_last.src +++ b/conf/app_last.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.3.1.tar.gz -SOURCE_SUM=19c856584f180b2ed5b3d0500cd3567f00e37fa9c493282bc119be8276cdddd9 +SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.4.tar.gz +SOURCE_SUM=dc82465f3b257d170cd0089a249bdee5378a8f52166ae95d1d7dc00512ef505c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/scripts/_variables b/scripts/_variables index a08ca42..fbe175c 100644 --- a/scripts/_variables +++ b/scripts/_variables @@ -9,7 +9,7 @@ then dashboard_version=3.3 FTL_version=3.0 else - pihole_core_version=5.3.1 - dashboard_version=5.5 - FTL_version=5.8.1 + pihole_core_version=5.4 + dashboard_version=5.6 + FTL_version=5.9 fi From bac742e976f0a044869a9ec518091202100a592d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 21 Sep 2021 14:00:58 +0200 Subject: [PATCH 3/6] bump version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 3e07f5d..e5410f7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Network-wide ad blocking via your own DNS server", "fr": "Filtrage publicitaire via votre propre serveur DNS" }, - "version": "5.3.1~ynh1", + "version": "5.4~ynh1", "url": "https://pi-hole.net/", "upstream": { "license": "EUPL-1.2", From f086fdb48e2d37d201a95564d4c7e32dbefc1b4f Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 21 Sep 2021 12:01:09 +0000 Subject: [PATCH 4/6] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5a7c61..48b3cce 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Network-wide ad blocking via your own DNS server -**Shipped version:** 5.3.1~ynh1 +**Shipped version:** 5.4~ynh1 diff --git a/README_fr.md b/README_fr.md index e59c023..2f5fbbb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Filtrage publicitaire via votre propre serveur DNS -**Version incluse :** 5.3.1~ynh1 +**Version incluse :** 5.4~ynh1 From 85ec773f2fd29de5439c4dcca386c1eca2776a8e Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 21 Sep 2021 14:05:20 +0200 Subject: [PATCH 5/6] fix regenconf --- conf/dnsmasq_regenconf_hook | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/dnsmasq_regenconf_hook b/conf/dnsmasq_regenconf_hook index 0af8f3f..e181ac4 100755 --- a/conf/dnsmasq_regenconf_hook +++ b/conf/dnsmasq_regenconf_hook @@ -16,13 +16,15 @@ pending_conf=$4/../dnsmasq dnsmasq_dir="${pending_conf}/etc/dnsmasq.d" mkdir -p "$dnsmasq_dir" +main_iface=$(ip route | grep --max-count=1 default | awk '{print $5;}') + cp -a "/etc/.pihole/advanced/01-pihole.conf" "$dnsmasq_dir/" ynh_replace_string --match_string="@DNS1@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="@DNS2@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="^no-resolv" --replace_string="#no-resolv" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="@INT@" --replace_string="$main_iface" --target_file="$dnsmasq_dir/01-pihole.conf" -ynh_replace_string --match_string="@cache-size@" --replace_string="1000" --target_file="$dnsmasq_dir/01-pihole.conf" +ynh_replace_string --match_string="@CACHE_SIZE@" --replace_string="1000" --target_file="$dnsmasq_dir/01-pihole.conf" query_logging=$(ynh_app_setting_get --app=$app --key=query_logging) if [ "$query_logging" = "true" ]; then ynh_replace_string --match_string="^#log-queries" --replace_string="log-queries" --target_file="$dnsmasq_dir/01-pihole.conf" @@ -48,7 +50,6 @@ if [ $enable_dhcp -eq 1 ] then # Get the default network interface - main_iface=$(ip route | grep --max-count=1 default | awk '{print $5;}') # Find the IP associated to the network interface localipv4=$(ip address | grep "${main_iface}\$" | awk '{print $2;}' | cut -d/ -f1) From ddc5f3e7092ef608a117bed9ca41fbc1adc8291a Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 21 Sep 2021 14:15:28 +0200 Subject: [PATCH 6/6] set the new version number in upgrade script --- scripts/upgrade | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 17e741e..eca6335 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -342,6 +342,13 @@ then ynh_store_file_checksum --file="$setupVars" fi +#================================================= +# SET VERSIONS FOR THE FOOTER OF THE WEB INTERFACE +#================================================= + +echo "master master master" > $pihole_storage/localbranches +echo "$pihole_core_version $dashboard_version $FTL_version" | tee $pihole_storage/{GitHubVersions,localversions} > /dev/null + #================================================= # UPDATE CRON JOB #=================================================