From e7ab4ea7a71513a612e9b2ba3bb93e9f5ff2dc24 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 20:14:22 +0200 Subject: [PATCH 1/6] 5.13 --- check_process | 8 +++----- conf/pi-hole_AdminLTE.src | 4 ++-- conf/pi-hole_Core.src | 4 ++-- conf/pi-hole_FTL.src | 4 ++-- manifest.json | 6 +++--- scripts/_common.sh | 4 ++-- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/check_process b/check_process index f7f8cef..24110a1 100644 --- a/check_process +++ b/check_process @@ -23,10 +23,8 @@ setup_private=1 setup_public=0 upgrade=1 - # 5.4~ynh1 - upgrade=1 from_commit=cfa9c5a3dbcfb765dcca3b2e7d179756afe26def # 5.11.4~ynh1 - upgrade=1 from_commit=3d2f68c4e19f335e63f8ffa259708b38a58c8f67 + upgrade=1 from_commit=4999654987af8b1427a6c72f8af482b235bb46db backup_restore=1 multi_instance=0 port_already_use=1 @@ -37,5 +35,5 @@ Email= Notification=none ;;; Upgrade options - ; commit=cfa9c5a3dbcfb765dcca3b2e7d179756afe26def - name=Merge pull request #66 + ; commit=4999654987af8b1427a6c72f8af482b235bb46db + name=Merge pull request #88 diff --git a/conf/pi-hole_AdminLTE.src b/conf/pi-hole_AdminLTE.src index 3727406..5c066f5 100644 --- a/conf/pi-hole_AdminLTE.src +++ b/conf/pi-hole_AdminLTE.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.13.tar.gz -SOURCE_SUM=67d01bd4245024c9c6f9bf474bb17e8bde269ccc42ba4bb5a99da25632162c21 +SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.16.tar.gz +SOURCE_SUM=9874e4745068a737cf4f6277719fc725ac25308fef950cdc27ff56aaa551ac4b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/pi-hole_Core.src b/conf/pi-hole_Core.src index 0792efb..4bb42b0 100644 --- a/conf/pi-hole_Core.src +++ b/conf/pi-hole_Core.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.11.4.tar.gz -SOURCE_SUM=e24db53c63a6ea240f0852bd082b224dda91ad4fd049ab700c218b9672fc59cf +SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.13.tar.gz +SOURCE_SUM=26222254df130b56d7e0419c9828c995415b2aafd1717f92850c6cb4e0e20d2d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/pi-hole_FTL.src b/conf/pi-hole_FTL.src index 65b730b..bdc92a3 100644 --- a/conf/pi-hole_FTL.src +++ b/conf/pi-hole_FTL.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.16.1.tar.gz -SOURCE_SUM=2fc5f2ce76328d10d4789cdd4bb73365f368e2d4c8daeeb0869b1a51771cbde1 +SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.18.2.tar.gz +SOURCE_SUM=69f167dd69fdc3ca18ee9067f0f8728f9d9be5686ecb68dc7d05df21e94f3a70 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index fcfff20..f6da29c 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.11.4~ynh1", + "version": "5.13~ynh1", "url": "https://pi-hole.net/", "upstream": { "license": "EUPL-1.2", @@ -26,12 +26,12 @@ } ], "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": false, "services": [ "nginx", - "php7.3-fpm" + "php7.4-fpm" ], "arguments": { "install": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index ba82989..82285ba 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,8 +9,8 @@ php_dependencies="php$YNH_DEFAULT_PHP_VERSION-common php$YNH_DEFAULT_PHP_VERSION # dependencies used by the app (must be on a single line) pkg_dependencies="cmake build-essential libgmp-dev libidn11-dev nettle-dev libreadline-dev sqlite3 cron curl iputils-ping psmisc unzip idn2 libcap2-bin dns-root-data libcap2 netcat-openbsd procps jq $php_dependencies" -pihole_adminlte_version=5.13 -pihole_flt_version=5.16.1 +pihole_adminlte_version=5.16 +pihole_flt_version=5.18.2 PI_HOLE_LOCAL_REPO="/etc/.pihole" PI_HOLE_INSTALL_DIR="/opt/pihole" From fdd91be1a1279bc03be28fa734e64a544225a941 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 18 Oct 2022 18:14:27 +0000 Subject: [PATCH 2/6] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9dd9ede..af7ce5d 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software. -**Shipped version:** 5.11.4~ynh1 - +**Shipped version:** 5.13~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 4029854..22b73a9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,8 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Pi-hole® est un puits DNS qui protège vos appareils des contenus indésirables sans installer de logiciel côté client. -**Version incluse :** 5.11.4~ynh1 - +**Version incluse :** 5.13~ynh1 ## Captures d'écran From 0a64e4511e925426fae4069e6671827cd9c75c2c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 20:14:35 +0200 Subject: [PATCH 3/6] Delete dhcp.md --- dhcp.md | 111 -------------------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 dhcp.md diff --git a/dhcp.md b/dhcp.md deleted file mode 100644 index 1542898..0000000 --- a/dhcp.md +++ /dev/null @@ -1,111 +0,0 @@ -Using Pi-hole as your DHCP server -================== - -> **Be careful, you should considering that playing with your DHCP may break your network. -In case your server is down, you will lose your dns resolution and ip address. -So, you will lose any internet connection and even the connection to your router.** - -> **If you encounter this kind of problem, please see "How to restore my network" at the end of this document.** - -### How to configure Pi-hole - -There're two ways to configure Pi-hole to be used as your DHCP server. -- Either you can choose to use it when you install the app. -- Or you can activate the DHCP server afterwards in the "Settings" tab, "Pi-hole DHCP Server" part. -In this second case, it can be better to set the ip of the server to a static address - -### How to configure my router - -Your personal router or ISP's router has a DHCP server enabled by default. -If you keep this DHCP, along with Pi-hole's one, you will have transparent conflicts between them. -The first DHCP to respond will distribute its own ip and settings. -So you have to turn off the DHCP of your router to let Pi-hole managed your network. - -#### Why should I use only the DHCP of Pi-hole ? - -By using the DHCP of Pi-hole, you allow Pi-hole to give at each of your client its dns configuration. This way every requests will be filtered by Pi-hole. - -Another use case of using Pi-hole's DHCP is if you have hairpinning problems (You can't connect to your server because its IP is your public IP, and your router doesn't allow that). -In this case, using Pi-hole's dns will allow you to connect to your server by its local address instead of its public one. - -### How to restore my network - -> Oh crap ! -Your Pi-hole server is down, and you don't have a DHCP anymore. -Don't panic, We'll get through it. \o/ - -Use your favorite terminal on your desktop computer. -And first, get your main interface (usually `eth0`). -``` bash -sudo ifconfig -``` - -Then, set your ip as a static ip. -``` bash -sudo ifconfig eth0 192.168.1.100 -``` - -Now, you can connect to your router and turn on its DHCP server to use it again. -You can now reset your ip and get a dynamic address. -``` bash -sudo ifconfig eth0 0.0.0.0 && sudo dhclient eth0 -``` - -> Don't forget to turn off the DHCP of your router if your server is working again. - ---- - -Faire de Pi-hole votre serveur DHCP -================== - -> **Attention, vous devez savoir que toucher à votre DHCP pourrait casser votre réseau. -Dans le cas où votre serveur serait inaccessible, vous perdriez votre résolution dns et votre adresse IP. -Ainsi, vous perdriez toute connexion à internet et même la connexion à votre routeur.** - -> **Si vous rencontrez ce genre de problèmes, merci de lire la section "Comment restaurer mon réseau" à la fin de ce document.** - -### Comment configurer Pi-hole - -Il y a 2 manière de configurer Pi-hole pour qu'il soit utilisé comme votre serveur DHCP. -- Soit vous pouvez choisir de l'utiliser lorsque vous installez l'application. -- Soit vous pouvez activer le serveur DHCP par la suite dans l'onglet "Settings", partie "Pi-hole DHCP Server". -Dans ce second cas, il peut être préférable de forcer l'ip du serveur à une adresse statique. - -### Comment configurer mon routeur - -Votre routeur ou celui de votre FAI dispose d'un serveur DHCP activé par défaut. -Si vous gardez ce DHCP, en même temps que celui de Pi-hole, vous allez avoir des conflits transparents entre eux. -Le premier serveur DHCP à répondre va distribuer ses propres ip et paramètres. -Donc vous devez éteindre le serveur DHCP de votre routeur et laisser Pi-hole gérer votre réseau. - -#### Pourquoi je devrais utiliser le DHCP de Pi-hole ? - -En utilisant le DHCP de Pi-hole, vous lui permettez de donner sa configuration dns à chacun de vos clients. De cette manière, chaque requête sera filtrée par Pi-hole. - -Un autre cas d'usage du DHCP de Pi-hole est le cas où vous rencontrez des problèmes de hairpinning (Vous ne pouvez pas vous connecter à votre serveur parce que son ip est votre ip publique, et votre routeur n'autorise pas cela). -Dans ce cas, utilisez le dns de Pi-hole va vous permettre de vous connecter à votre serveur par son adresse locale plutôt que son adresse publique. - -### Comment restaurer mon réseau - -> Oups ! -Votre serveur Pi-hole est tombé, et vous n'avez plus de DHCP. -Ne paniquez pas, on va surmonter ça \o/ - -Utilisez votre terminal favori sur votre ordinateur de bureau. -Et tout d'abord, récupérer votre interface réseau (Le plus souvent `eth0`). -``` bash -sudo ifconfig -``` - -Ensuite, changer votre ip pour une ip statique. -``` bash -sudo ifconfig eth0 192.168.1.100 -``` - -Maintenant, vous pouvez vous connecter à votre routeur et rallumer son serveur DHCP pour l'utiliser à nouveau. -Vous pouvez maintenant retirer votre ip statique et réobtenir une ip dynamique. -``` bash -sudo ifconfig eth0 0.0.0.0 && sudo dhclient eth0 -``` - -> N'oubliez pas d'éteindre le DHCP de votre routeur si votre serveur fonctionne à nouveau. From 42bb4bb2644679c08ec2f6c3904eef7e84d07f57 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 20:29:45 +0200 Subject: [PATCH 4/6] Revert "Delete dhcp.md" This reverts commit 0a64e4511e925426fae4069e6671827cd9c75c2c. --- dhcp.md | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 dhcp.md diff --git a/dhcp.md b/dhcp.md new file mode 100644 index 0000000..1542898 --- /dev/null +++ b/dhcp.md @@ -0,0 +1,111 @@ +Using Pi-hole as your DHCP server +================== + +> **Be careful, you should considering that playing with your DHCP may break your network. +In case your server is down, you will lose your dns resolution and ip address. +So, you will lose any internet connection and even the connection to your router.** + +> **If you encounter this kind of problem, please see "How to restore my network" at the end of this document.** + +### How to configure Pi-hole + +There're two ways to configure Pi-hole to be used as your DHCP server. +- Either you can choose to use it when you install the app. +- Or you can activate the DHCP server afterwards in the "Settings" tab, "Pi-hole DHCP Server" part. +In this second case, it can be better to set the ip of the server to a static address + +### How to configure my router + +Your personal router or ISP's router has a DHCP server enabled by default. +If you keep this DHCP, along with Pi-hole's one, you will have transparent conflicts between them. +The first DHCP to respond will distribute its own ip and settings. +So you have to turn off the DHCP of your router to let Pi-hole managed your network. + +#### Why should I use only the DHCP of Pi-hole ? + +By using the DHCP of Pi-hole, you allow Pi-hole to give at each of your client its dns configuration. This way every requests will be filtered by Pi-hole. + +Another use case of using Pi-hole's DHCP is if you have hairpinning problems (You can't connect to your server because its IP is your public IP, and your router doesn't allow that). +In this case, using Pi-hole's dns will allow you to connect to your server by its local address instead of its public one. + +### How to restore my network + +> Oh crap ! +Your Pi-hole server is down, and you don't have a DHCP anymore. +Don't panic, We'll get through it. \o/ + +Use your favorite terminal on your desktop computer. +And first, get your main interface (usually `eth0`). +``` bash +sudo ifconfig +``` + +Then, set your ip as a static ip. +``` bash +sudo ifconfig eth0 192.168.1.100 +``` + +Now, you can connect to your router and turn on its DHCP server to use it again. +You can now reset your ip and get a dynamic address. +``` bash +sudo ifconfig eth0 0.0.0.0 && sudo dhclient eth0 +``` + +> Don't forget to turn off the DHCP of your router if your server is working again. + +--- + +Faire de Pi-hole votre serveur DHCP +================== + +> **Attention, vous devez savoir que toucher à votre DHCP pourrait casser votre réseau. +Dans le cas où votre serveur serait inaccessible, vous perdriez votre résolution dns et votre adresse IP. +Ainsi, vous perdriez toute connexion à internet et même la connexion à votre routeur.** + +> **Si vous rencontrez ce genre de problèmes, merci de lire la section "Comment restaurer mon réseau" à la fin de ce document.** + +### Comment configurer Pi-hole + +Il y a 2 manière de configurer Pi-hole pour qu'il soit utilisé comme votre serveur DHCP. +- Soit vous pouvez choisir de l'utiliser lorsque vous installez l'application. +- Soit vous pouvez activer le serveur DHCP par la suite dans l'onglet "Settings", partie "Pi-hole DHCP Server". +Dans ce second cas, il peut être préférable de forcer l'ip du serveur à une adresse statique. + +### Comment configurer mon routeur + +Votre routeur ou celui de votre FAI dispose d'un serveur DHCP activé par défaut. +Si vous gardez ce DHCP, en même temps que celui de Pi-hole, vous allez avoir des conflits transparents entre eux. +Le premier serveur DHCP à répondre va distribuer ses propres ip et paramètres. +Donc vous devez éteindre le serveur DHCP de votre routeur et laisser Pi-hole gérer votre réseau. + +#### Pourquoi je devrais utiliser le DHCP de Pi-hole ? + +En utilisant le DHCP de Pi-hole, vous lui permettez de donner sa configuration dns à chacun de vos clients. De cette manière, chaque requête sera filtrée par Pi-hole. + +Un autre cas d'usage du DHCP de Pi-hole est le cas où vous rencontrez des problèmes de hairpinning (Vous ne pouvez pas vous connecter à votre serveur parce que son ip est votre ip publique, et votre routeur n'autorise pas cela). +Dans ce cas, utilisez le dns de Pi-hole va vous permettre de vous connecter à votre serveur par son adresse locale plutôt que son adresse publique. + +### Comment restaurer mon réseau + +> Oups ! +Votre serveur Pi-hole est tombé, et vous n'avez plus de DHCP. +Ne paniquez pas, on va surmonter ça \o/ + +Utilisez votre terminal favori sur votre ordinateur de bureau. +Et tout d'abord, récupérer votre interface réseau (Le plus souvent `eth0`). +``` bash +sudo ifconfig +``` + +Ensuite, changer votre ip pour une ip statique. +``` bash +sudo ifconfig eth0 192.168.1.100 +``` + +Maintenant, vous pouvez vous connecter à votre routeur et rallumer son serveur DHCP pour l'utiliser à nouveau. +Vous pouvez maintenant retirer votre ip statique et réobtenir une ip dynamique. +``` bash +sudo ifconfig eth0 0.0.0.0 && sudo dhclient eth0 +``` + +> N'oubliez pas d'éteindre le DHCP de votre routeur si votre serveur fonctionne à nouveau. From ddfbeb45c5407aa5bb5b6b2d304c1255b446e025 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 20:38:28 +0200 Subject: [PATCH 5/6] Fix typos --- config_panel.toml.example | 2 +- scripts/install | 2 +- scripts/restore | 4 ++-- scripts/upgrade | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config_panel.toml.example b/config_panel.toml.example index d8518a1..1c3cfad 100644 --- a/config_panel.toml.example +++ b/config_panel.toml.example @@ -1,4 +1,4 @@ -version = "0.1" +version = "1.0" name = "PiHole configuration panel" [main] diff --git a/scripts/install b/scripts/install index 20dc843..c1a968c 100644 --- a/scripts/install +++ b/scripts/install @@ -353,7 +353,7 @@ admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4) if [ $enable_dhcp -eq 1 ] then - dhcp_alert="You asked to use the internal DHCP server of dnsmasq with PiHole. + dhcp_alert="You asked to use the internal DHCP server of dnsmasq with Pi-hole. You should really read the __URL_TAG1__documentation about that__URL_TAG2__https://github.com/YunoHost-Apps/pihole_ynh/blob/master/dhcp.md__URL_TAG3__ " diff --git a/scripts/restore b/scripts/restore index 035e777..04f3281 100644 --- a/scripts/restore +++ b/scripts/restore @@ -274,12 +274,12 @@ ynh_maintenance_mode_OFF # SEND A README FOR THE ADMIN #================================================= -# Get main domain and buid the url of the admin panel of the app. +# Get main domain and buid the URL of the admin panel of the app. admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" if [ $enable_dhcp -eq 1 ] then - dhcp_alert="You asked to use the internal DHCP server of Dnsmasq with PiHole. + dhcp_alert="You asked to use the internal DHCP server of Dnsmasq with Pi-hole. You should really read the __URL_TAG1__documentation about that__URL_TAG2__https://github.com/YunoHost-Apps/pihole_ynh/blob/master/dhcp.md__URL_TAG3__ " diff --git a/scripts/upgrade b/scripts/upgrade index 8286065..adbed2c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -152,11 +152,11 @@ ynh_install_app_dependencies $pkg_dependencies # PHP-FPM CONFIGURATION #================================================= -# Overwrite the php-fpm configuration only if it's allowed +# Overwrite the PHP-FPM configuration only if it's allowed if [ $overwrite_phpfpm -eq 1 ] then ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3 - # Create a dedicated php-fpm config + # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --dedicated_service fi @@ -164,7 +164,7 @@ fi # NGINX CONFIGURATION #================================================= -# Overwrite the nginx configuration only if it's allowed +# Overwrite the NGINX configuration only if it's allowed if [ $overwrite_nginx -eq 1 ] then ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 @@ -252,7 +252,7 @@ ynh_replace_string --match_string="59 1 " --replace_string="$((1 + RANDOM % 58)) # Randomize update checker time ynh_replace_string --match_string="59 17" --replace_string="$((1 + RANDOM % 58)) $((12 + RANDOM % 8))" --target_file="/etc/cron.d/pihole" -# Remove git usage for version. Which fails because we use here a release instead of master. +# Remove Git usage for version. Which fails because we use here a release instead of master. ynh_replace_string --match_string=".*updatechecker.*" --replace_string="#&" --target_file=/etc/cron.d/pihole #================================================= @@ -418,7 +418,7 @@ ynh_maintenance_mode_OFF # Get main domain and buid the url of the admin panel of the app. admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" -# If a html email is required. Apply html to the changelog. +# If a HTML email is required. Apply HTML to the changelog. if [ "$admin_mail_html" -eq 1 ]; then format=html else @@ -428,7 +428,7 @@ ynh_app_changelog --format=$format if [ $enable_dhcp -eq 1 ] then - dhcp_alert="You asked to use the internal DHCP server of dnsmasq with PiHole. + dhcp_alert="You asked to use the internal DHCP server of dnsmasq with Pi-hole. You should really read the documentation about that, https://github.com/YunoHost-Apps/pihole_ynh/blob/master/dhcp.md " From c1bf9caad693a051c220382ca9ae81b88c411cb8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 19 Oct 2022 22:32:11 +0200 Subject: [PATCH 6/6] Update check_process --- check_process | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check_process b/check_process index 24110a1..e817edc 100644 --- a/check_process +++ b/check_process @@ -23,7 +23,10 @@ setup_private=1 setup_public=0 upgrade=1 + # 5.4~ynh1 + upgrade=1 from_commit=cfa9c5a3dbcfb765dcca3b2e7d179756afe26def # 5.11.4~ynh1 + upgrade=1 from_commit=3d2f68c4e19f335e63f8ffa259708b38a58c8f67 upgrade=1 from_commit=4999654987af8b1427a6c72f8af482b235bb46db backup_restore=1 multi_instance=0