From 29fcff73a18d8f43dc7144c84f746496e3eaef17 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 24 Dec 2021 23:56:16 +0100 Subject: [PATCH 01/20] 5.7 --- conf/FTL_last.src | 5 ++--- conf/admin_dashboard_last.src | 4 ++-- conf/app_last.src | 4 ++-- manifest.json | 2 +- scripts/restore | 3 +-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/conf/FTL_last.src b/conf/FTL_last.src index bb6cd85..b0ef874 100644 --- a/conf/FTL_last.src +++ b/conf/FTL_last.src @@ -1,6 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.11.tar.gz -SOURCE_SUM=e7f1ec8b12629ae4b1b5453f18f5247cb7c68037094c6cf7f8e046e18ce2c283 +SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.12.tar.gz +SOURCE_SUM=cc0864cdf7c10b82f04049e97dafef2eacb2b8155e7cb11e0383482f5dc0f1d6 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/conf/admin_dashboard_last.src b/conf/admin_dashboard_last.src index 879e895..0104342 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.8.tar.gz -SOURCE_SUM=b594374bd3d6361ad5fa35958b17a08965fcc77d3ef4c4a7938410116b0cf5be +SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.9.tar.gz +SOURCE_SUM=1c89d2786bd58c18d1072227b9509f9de26f870509b353e228b193d553a9b92e 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 452929e..7bb0b09 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.6.tar.gz -SOURCE_SUM=c65f31418bdbfbf9ed482e5380f0b7f8370e69817dd1db70bea98f337198bf47 +SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.7.tar.gz +SOURCE_SUM=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index d36de66..78a0f38 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.6~ynh1", + "version": "5.7~ynh1", "url": "https://pi-hole.net/", "upstream": { "license": "EUPL-1.2", diff --git a/scripts/restore b/scripts/restore index a0f1e61..d17d284 100644 --- a/scripts/restore +++ b/scripts/restore @@ -44,8 +44,7 @@ fpm_service=$(ynh_app_setting_get --app=$app --key=fpm_service) #================================================= ynh_script_progression --message="Validating restoration parameters..." -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # ACTIVATE MAINTENANCE MODE From f8e316df550d788d5cb197fbf079e1efa1ba30bb Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 24 Dec 2021 22:56:21 +0000 Subject: [PATCH 02/20] 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 fa661f7..35dca0d 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.6~ynh1 +**Shipped version:** 5.7~ynh1 diff --git a/README_fr.md b/README_fr.md index 89be07a..a2dea9b 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.6~ynh1 +**Version incluse :** 5.7~ynh1 From e9b803113f1d817ed979d6e720866a14f6e19975 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 25 Dec 2021 14:02:26 +0100 Subject: [PATCH 03/20] Update app_last.src --- conf/app_last.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app_last.src b/conf/app_last.src index 7bb0b09..9615e11 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.7.tar.gz -SOURCE_SUM=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 +SOURCE_SUM=e90eb7872b213fc248f19d41ff57ddbc2c6af2287522b03c98cdfeeb9c1edfb4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From c40317222ff5d46de7a763809addc66edc688c51 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 6 Jan 2022 14:48:11 +0100 Subject: [PATCH 04/20] WIP: remove old version of pihole --- check_process | 20 --- conf/{FTL_last.src => FTL.src} | 0 conf/FTL_3.src | 5 - ...dashboard_last.src => admin_dashboard.src} | 0 conf/admin_dashboard_3.src | 5 - conf/{app_last.src => app.src} | 0 conf/app_3.src | 6 - doc/DISCLAIMER.md | 2 - doc/DISCLAIMER_fr.md | 2 - manifest.json | 14 -- scripts/_variables | 13 +- scripts/actions/reset_default_app | 75 +++------- scripts/install | 135 +++++------------- scripts/remove | 45 +++--- scripts/restore | 63 ++++---- scripts/upgrade | 131 ++++++----------- 16 files changed, 149 insertions(+), 367 deletions(-) rename conf/{FTL_last.src => FTL.src} (100%) delete mode 100644 conf/FTL_3.src rename conf/{admin_dashboard_last.src => admin_dashboard.src} (100%) delete mode 100644 conf/admin_dashboard_3.src rename conf/{app_last.src => app.src} (100%) delete mode 100644 conf/app_3.src diff --git a/check_process b/check_process index 0931364..020c8a2 100644 --- a/check_process +++ b/check_process @@ -5,7 +5,6 @@ admin="john" query_logging=1 enable_dhcp=0 - pihole_version="Last available" ; Config_panel main.overwrite_files.overwrite_setupvars=0|1 main.overwrite_files.overwrite_ftl=0|1 @@ -30,25 +29,6 @@ change_url=1 actions=1 config_panel=1 -;; Test version 3 - ; Manifest - domain="domain.tld" - path="/path" - admin="john" - query_logging=1 - enable_dhcp=0 - pihole_version="Last 3.X" - ; Checks - setup_sub_dir=1 - setup_root=1 - upgrade=1 - upgrade=1 from_commit=d79ec131b3038ff4695c3317b5d3ee4eda9c8932 - backup_restore=1 - actions=1 ;;; Options Email= Notification=change -;;; Upgrade options - ; commit=d79ec131b3038ff4695c3317b5d3ee4eda9c8932 - name= Stretch fix - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&query_logging=1& diff --git a/conf/FTL_last.src b/conf/FTL.src similarity index 100% rename from conf/FTL_last.src rename to conf/FTL.src diff --git a/conf/FTL_3.src b/conf/FTL_3.src deleted file mode 100644 index 5c35de5..0000000 --- a/conf/FTL_3.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/pi-hole/FTL/archive/v3.0.tar.gz -SOURCE_SUM=8c3d55eb3054698172e59ae81b8562ce235d73da461389840da62d90b32f0057 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true diff --git a/conf/admin_dashboard_last.src b/conf/admin_dashboard.src similarity index 100% rename from conf/admin_dashboard_last.src rename to conf/admin_dashboard.src diff --git a/conf/admin_dashboard_3.src b/conf/admin_dashboard_3.src deleted file mode 100644 index d892835..0000000 --- a/conf/admin_dashboard_3.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v3.3.tar.gz -SOURCE_SUM=caba2129fe8753b0c7aaf611b7c7b2146ff1ac56d5ac58987053b1553d09c49f -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true diff --git a/conf/app_last.src b/conf/app.src similarity index 100% rename from conf/app_last.src rename to conf/app.src diff --git a/conf/app_3.src b/conf/app_3.src deleted file mode 100644 index ac08837..0000000 --- a/conf/app_3.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v3.3.1.tar.gz -SOURCE_SUM=6a80e4b6b38fc65df83459fe52f3a61623763709a077645f25ac9e29247e6d6d -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 02f09ba..fdd0fd7 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -5,8 +5,6 @@ Use the admin panel of your Pi-hole to configure this app. You may also need to ## Limitations * Activate DHCP with Pi-hole needs manual configuration of your router. -* Pi-Hole can't be updated beyond version 3.3.1, because higher versions use an integrated version of dnsmasq. This would require disabling the version of dnsmasq used by YunoHost. - ## Using Pi-hole as your DHCP server diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index b5f17f2..a8c55e6 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -5,8 +5,6 @@ Utiliser le panneau d'administration de votre Pi-hole pour configurer cette appl ## Limitations * Activer DHCP avec Pi-hole nécessite une configuration manuelle de votre routeur. -* Pi-Hole ne peut pas être mis à jour au-delà de la version 3.3.1, car les versions supérieures utilisent une version intégrée de dnsmasq. Ce qui oblige a désactiver la version de dnsmasq utilisée par YunoHost. - ## Faire de Pi-hole votre serveur DHCP diff --git a/manifest.json b/manifest.json index d36de66..b3a59f0 100644 --- a/manifest.json +++ b/manifest.json @@ -72,20 +72,6 @@ "fr": "Si vous voulez faire ça, vous devez vraiment lire cela avant !" }, "default": false - }, - { - "name": "pihole_version", - "type": "string", - "ask": { - "en": "Which version of Pi-Hole do you want to install?", - "fr": "Quelle version de Pi-Hole voulez-vous installer ?" - }, - "help": { - "en": "The last 3.X version is the last version available with the Debian version of dnsmasq. The last available version will replace the Debian version of dnsmasq by FTLDNS.
See the readme for more information.", - "fr": "La dernière version 3.X est la dernière version disponible avec la version Debian de dnsmasq. La dernière version disponible remplacera la version Debian de dnsmasq par FTLDNS.
Voir le readme pour plus d'informations." - }, - "choices": ["Last 3.X","Last available"], - "default": "Last 3.X" } ] } diff --git a/scripts/_variables b/scripts/_variables index f6ca2f5..b613306 100644 --- a/scripts/_variables +++ b/scripts/_variables @@ -3,13 +3,6 @@ # Dependencies app_depencencies="sqlite3 idn2 php7.3-sqlite3 nettle-dev libcap2-bin build-essential libgmp-dev m4 cmake libidn11-dev libreadline-dev xxd" -if [ "$YNH_APP_ARG_PIHOLE_VERSION" == "Last 3.X" ] -then - pihole_core_version=3.3.1 - dashboard_version=3.3 - FTL_version=3.0 -else - pihole_core_version=5.6 - dashboard_version=5.8 - FTL_version=5.11 -fi +pihole_core_version=5.6 +dashboard_version=5.8 +FTL_version=5.11 diff --git a/scripts/actions/reset_default_app b/scripts/actions/reset_default_app index adbebb1..61a94d7 100755 --- a/scripts/actions/reset_default_app +++ b/scripts/actions/reset_default_app @@ -32,7 +32,6 @@ app=$YNH_APP_INSTANCE_NAME path_url=$(ynh_app_setting_get --app=$app --key=path) domain=$(ynh_app_setting_get --app=$app --key=domain) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -pihole_version="$(ynh_app_setting_get --app=$app --key=pihole_version)" #================================================= # SPECIFIC ACTION @@ -58,21 +57,14 @@ ynh_script_progression --message="Resetting source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src pihole_local_repo="/etc/.pihole" -(cd scripts -if [ "$pihole_version" == "Last 3.X" ] -then - # Overwrite the version 3.3.1 - YNH_CWD=$PWD ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app_3 - # Overwrite admin dashboard - YNH_CWD=$PWD ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_3 -else +( + cd scripts # Overwrite the last version available - YNH_CWD=$PWD ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app_last + YNH_CWD=$PWD ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app # Overwrite admin dashboard - YNH_CWD=$PWD ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_last -fi + YNH_CWD=$PWD ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard -chown $app:www-data "$final_path" + chown $app:www-data "$final_path" ) @@ -133,12 +125,7 @@ chown $dnsmasq_user:root /var/log/{pihole,pihole-FTL}.log #================================================= # This sudoers config allow pihole to execute /usr/local/bin/pihole as root without password. Nothing more. -if [ "$pihole_version" == "Last 3.X" ] -then - cp "$pihole_local_repo/advanced/pihole.sudo" /etc/sudoers.d/pihole -else - cp "$pihole_local_repo/advanced/Templates/pihole.sudo" /etc/sudoers.d/pihole -fi +cp "$pihole_local_repo/advanced/Templates/pihole.sudo" /etc/sudoers.d/pihole echo "$app ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole # echo "Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin" >> /etc/sudoers.d/pihole chmod 0440 /etc/sudoers.d/pihole @@ -147,12 +134,7 @@ chmod 0440 /etc/sudoers.d/pihole # REINSTALL LOGROTATE SCRIPT FOR PI-HOLE #================================================= -if [ "$pihole_version" == "Last 3.X" ] -then - cp "$pihole_local_repo/advanced/logrotate" "$pihole_storage/logrotate" -else - cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate" -fi +cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate" sed -i "/# su #/d;" "$pihole_storage/logrotate" #================================================= @@ -162,19 +144,15 @@ ynh_script_progression --message="Reinstalling PiHole-FTL..." --weight=30 # Get the source of Pi-Hole-FTL FTL_temp_path=$(mktemp -d) -if [ "$pihole_version" == "Last 3.X" ] -then - # Install the version 3.3.1 - ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL_3 -else - # Install the last version available - ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL_last -fi +# Install the last version available +ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL # Instead of downloading a binary file, we're going to compile it -( cd "$FTL_temp_path" -ynh_exec_warn_less make -ynh_exec_warn_less make install ) +( + cd "$FTL_temp_path" + ynh_exec_warn_less make + ynh_exec_warn_less make install +) ynh_secure_remove --file="$FTL_temp_path" cp "../conf/dns-servers.conf" "$pihole_storage" @@ -182,20 +160,12 @@ cp "../conf/dns-servers.conf" "$pihole_storage" # Restore the default pihole-FTL.conf yunohost app action run $app reset_default_ftl -if [ "$pihole_version" == "Last 3.X" ] -then - # Version 3.3.1 - cp -a $pihole_local_repo/advanced/pihole-FTL.service /etc/init.d/pihole-FTL - chmod +x /etc/init.d/pihole-FTL - ynh_exec_warn_less systemctl enable pihole-FTL -else - cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL - chmod +x /etc/init.d/pihole-FTL - ynh_exec_warn_less systemctl enable pihole-FTL +cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL +chmod +x /etc/init.d/pihole-FTL +ynh_exec_warn_less systemctl enable pihole-FTL - # Reload systemd config - systemctl daemon-reload -fi +# Reload systemd config +systemctl daemon-reload #================================================= # RESET THE VARIABLES FILE @@ -215,12 +185,7 @@ yunohost app action run $app reset_default_dnsmasq # REINSTALL CRON JOB #================================================= -if [ "$pihole_version" == "Last 3.X" ] -then - cp $pihole_local_repo/advanced/pihole.cron /etc/cron.d/pihole -else - cp $pihole_local_repo/advanced/Templates/pihole.cron /etc/cron.d/pihole -fi +cp $pihole_local_repo/advanced/Templates/pihole.cron /etc/cron.d/pihole # 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 diff --git a/scripts/install b/scripts/install index 3258471..e5a844b 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,6 @@ path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN query_logging=$YNH_APP_ARG_QUERY_LOGGING enable_dhcp=$YNH_APP_ARG_ENABLE_DHCP -pihole_version="$YNH_APP_ARG_PIHOLE_VERSION" app=$YNH_APP_INSTANCE_NAME @@ -53,7 +52,6 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=query_logging --value=$query_logging ynh_app_setting_set --app=$app --key=enable_dhcp --value=$enable_dhcp -ynh_app_setting_set --app=$app --key=pihole_version --value="$pihole_version" ynh_app_setting_set --app=$app --key=overwrite_setupvars --value=1 ynh_app_setting_set --app=$app --key=overwrite_ftl --value=1 @@ -103,18 +101,11 @@ ynh_script_progression --message="Setting up source files..." --weight=4 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Make a copy of local pihole repository (for Gravity) pihole_local_repo="/etc/.pihole" -if [ "$pihole_version" == "Last 3.X" ] -then - # Install the version 3.3.1 - ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app_3 - # Install admin dashboard - ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_3 -else - # Install the last version available - ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app_last - # Install admin dashboard - ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_last -fi + +# Install the last version available +ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app +# Install admin dashboard +ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard chown $app:www-data "$final_path" @@ -177,12 +168,7 @@ chown $dnsmasq_user:root /var/log/{pihole,pihole-FTL}.log #================================================= # This sudoers config allow pihole to execute /usr/local/bin/pihole as root without password. Nothing more. -if [ "$pihole_version" == "Last 3.X" ] -then - cp "$pihole_local_repo/advanced/pihole.sudo" /etc/sudoers.d/pihole -else - cp "$pihole_local_repo/advanced/Templates/pihole.sudo" /etc/sudoers.d/pihole -fi +cp "$pihole_local_repo/advanced/Templates/pihole.sudo" /etc/sudoers.d/pihole echo "$app ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole # echo "Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin" >> /etc/sudoers.d/pihole chmod 0440 /etc/sudoers.d/pihole @@ -191,12 +177,7 @@ chmod 0440 /etc/sudoers.d/pihole # INSTALL LOGROTATE SCRIPT FOR PI-HOLE #================================================= -if [ "$pihole_version" == "Last 3.X" ] -then - cp "$pihole_local_repo/advanced/logrotate" "$pihole_storage/logrotate" -else - cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate" -fi +cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate" sed -i "/# su #/d;" "$pihole_storage/logrotate" #================================================= @@ -206,65 +187,51 @@ ynh_script_progression --message="Installing PiHole-FTL..." --weight=30 # Get the source of Pi-Hole-FTL FTL_temp_path=$(mktemp -d) -if [ "$pihole_version" == "Last 3.X" ] -then - # Install the version 3.3.1 - ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL_3 -else - # Install the last version available - ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL_last -fi +# Install the last version available +ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL # Instead of downloading a binary file, we're going to compile it -( cd "$FTL_temp_path" -if [ "$pihole_version" == "Last available" ] -then +( + cd "$FTL_temp_path" ynh_exec_warn_less cmake . -fi -ynh_exec_warn_less make -ynh_exec_warn_less make install ) + ynh_exec_warn_less make + ynh_exec_warn_less make install +) ynh_secure_remove --file="$FTL_temp_path" cp "../conf/dns-servers.conf" "$pihole_storage" ynh_add_config --template="../conf/pihole-FTL.conf" --destination="$pihole_storage/pihole-FTL.conf" -if [ "$pihole_version" == "Last 3.X" ] -then - # Version 3.3.1 - cp -a $pihole_local_repo/advanced/pihole-FTL.service /etc/init.d/pihole-FTL - chmod +x /etc/init.d/pihole-FTL - ynh_exec_warn_less systemctl enable pihole-FTL --quiet -else - # Last version available - # Stopped dnsmasq to replace it by pihole-FTL - ynh_systemd_action --action=stop --service_name=dnsmasq +# Last version available +# Stopped dnsmasq to replace it by pihole-FTL +ynh_systemd_action --action=stop --service_name=dnsmasq - # Disable the real dnsmasq service - ynh_exec_warn_less systemctl disable dnsmasq --quiet +# Disable the real dnsmasq service +#ynh_exec_warn_less systemctl disable dnsmasq --quiet - # And move the files that make the service available in systemd to really disable it - mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/.dnsmasq.service.backup_by_pihole - mv /etc/init.d/dnsmasq /etc/init.d/.dnsmasq.backup_by_pihole +# And move the files that make the service available in systemd to really disable it +#mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/.dnsmasq.service.backup_by_pihole +#mv /etc/init.d/dnsmasq /etc/init.d/.dnsmasq.backup_by_pihole - # Move dnsmasq to preserve the current binary - mv /usr/sbin/dnsmasq /usr/sbin/dnsmasq.backup_by_pihole - # Replace dnsmasq by pihole-FTL - # NOTE: pihole-FTL is actually a modified version of dnsmasq - # https://github.com/pi-hole/FTL/tree/master/dnsmasq - ln -s /usr/bin/pihole-FTL /usr/sbin/dnsmasq +# Move dnsmasq to preserve the current binary +#mv /usr/sbin/dnsmasq /usr/sbin/dnsmasq.backup_by_pihole +# Replace dnsmasq by pihole-FTL +# NOTE: pihole-FTL is actually a modified version of dnsmasq +# https://github.com/pi-hole/FTL/tree/master/dnsmasq +#ln -s /usr/bin/pihole-FTL /usr/sbin/dnsmasq - cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL - chmod +x /etc/init.d/pihole-FTL - ynh_exec_warn_less systemctl enable pihole-FTL --quiet +cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL +chmod +x /etc/init.d/pihole-FTL +ynh_exec_warn_less systemctl enable pihole-FTL --quiet - # Replace the service dnsmasq by pihole-FTL - # That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL - ln -s /run/systemd/generator.late/pihole-FTL.service /etc/systemd/system/dnsmasq.service +# Replace the service dnsmasq by pihole-FTL +# That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL +#ln -s /run/systemd/generator.late/pihole-FTL.service /etc/systemd/system/dnsmasq.service +systemctl mask dnsmasq.service - # Reload systemd config - systemctl daemon-reload -fi +# Reload systemd config +systemctl daemon-reload #================================================= # BUILD VARIABLES FILE @@ -327,41 +294,17 @@ echo "$pihole_core_version $dashboard_version $FTL_version" | tee $pihole_storag # INSTALL CRON JOB #================================================= -if [ "$pihole_version" == "Last 3.X" ] -then - cp $pihole_local_repo/advanced/pihole.cron /etc/cron.d/pihole -else - cp $pihole_local_repo/advanced/Templates/pihole.cron /etc/cron.d/pihole -fi +cp $pihole_local_repo/advanced/Templates/pihole.cron /etc/cron.d/pihole # 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 -#================================================= -# RESTART DNSMASQ -#================================================= - -# Restart dnsmasq only for the version 3.X, otherwise we're going to restart it twice. -if [ "$pihole_version" == "Last 3.X" ] -then - ynh_script_progression --message="Restarting Dnsmasq..." --weight=2 - - ynh_systemd_action --action=restart --service_name=dnsmasq - - ynh_systemd_action --action=restart --service_name=pihole-FTL -fi - #================================================= # BUILD THE LISTS WITH GRAVITY #================================================= ynh_script_progression --message="Building the lists with Gravity..." --weight=7 -if [ "$pihole_version" == "Last 3.X" ] -then - cp "$pihole_local_repo/adlists.default" "$pihole_storage/adlists.default" -else - cp "../conf/adlists.default" "$pihole_storage/adlists.list" -fi +cp "../conf/adlists.default" "$pihole_storage/adlists.list" ynh_exec_warn_less /opt/pihole/gravity.sh #================================================= diff --git a/scripts/remove b/scripts/remove index 0870673..007425d 100755 --- a/scripts/remove +++ b/scripts/remove @@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) port=$(ynh_app_setting_get --app=$app --key=port) -pihole_version="$(ynh_app_setting_get --app=$app --key=pihole_version)" #================================================= # STANDARD REMOVE @@ -38,30 +37,25 @@ fi #================================================= ynh_script_progression --message="Stop and remove the service" -if [ "$pihole_version" == "Last 3.X" ] -then - ynh_systemd_action --action=stop --service_name=pihole-FTL - ynh_exec_warn_less systemctl disable pihole-FTL --quiet -else - ynh_systemd_action --action=stop --service_name=pihole-FTL +ynh_systemd_action --action=stop --service_name=pihole-FTL - # Restore dnsmasq as main DNS resolver - # Move dnsmasq back to its original place - if [ -e "/usr/sbin/dnsmasq.backup_by_pihole" ] - then # Remove dnsmasq only if we have its backup - ynh_secure_remove --file="/usr/sbin/dnsmasq" - mv /usr/sbin/dnsmasq.backup_by_pihole /usr/sbin/dnsmasq - fi +# Restore dnsmasq as main DNS resolver +# Move dnsmasq back to its original place +#if [ -e "/usr/sbin/dnsmasq.backup_by_pihole" ] +#then # Remove dnsmasq only if we have its backup +# ynh_secure_remove --file="/usr/sbin/dnsmasq" +# mv /usr/sbin/dnsmasq.backup_by_pihole /usr/sbin/dnsmasq +#fi - # Move back the service configuration for dnsmasq - ynh_secure_remove --file="/etc/systemd/system/dnsmasq.service" - mv /lib/systemd/system/.dnsmasq.service.backup_by_pihole /lib/systemd/system/dnsmasq.service - mv /etc/init.d/.dnsmasq.backup_by_pihole /etc/init.d/dnsmasq +# Move back the service configuration for dnsmasq +#ynh_secure_remove --file="/etc/systemd/system/dnsmasq.service" +#mv /lib/systemd/system/.dnsmasq.service.backup_by_pihole /lib/systemd/system/dnsmasq.service +#mv /etc/init.d/.dnsmasq.backup_by_pihole /etc/init.d/dnsmasq +systemctl unmask dnsmasq.service - ynh_exec_warn_less systemctl enable dnsmasq --quiet - # Reload systemd config - systemctl daemon-reload -fi +#ynh_exec_warn_less systemctl enable dnsmasq --quiet +# Reload systemd config +systemctl daemon-reload ynh_secure_remove --file="/etc/init.d/pihole-FTL" ynh_secure_remove --file="/usr/bin/pihole-FTL" @@ -188,11 +182,8 @@ ynh_systemd_action --action=restart --service_name=dnsmasq #================================================= ynh_script_progression --message="Removing the dedicated system user..." --weight=2 -if [ "$pihole_version" == "Last 3.X" ] -then - # Dirty hack to remove correctly the user - killall -u $app -fi +# Dirty hack to remove correctly the user +killall -u $app ynh_system_user_delete --username=$app #================================================= diff --git a/scripts/restore b/scripts/restore index a0f1e61..e8e9d74 100644 --- a/scripts/restore +++ b/scripts/restore @@ -31,7 +31,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) enable_dhcp=$(ynh_app_setting_get --app=$app --key=enable_dhcp) admin=$(ynh_app_setting_get --app=$app --key=admin) -pihole_version="$(ynh_app_setting_get --app=$app --key=pihole_version)" # Get variables from ynh_add_fpm_config fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) @@ -153,38 +152,36 @@ ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_ # REPLACE THE DEFAULT DNSMASQ BY PIHOLE-FTL #================================================= -if [ "$pihole_version" == "Last available" ] -then - # Last version available - # Stopped dnsmasq to replace it by pihole-FTL - ynh_systemd_action --action=stop --service_name=dnsmasq +# Last version available +# Stopped dnsmasq to replace it by pihole-FTL +ynh_systemd_action --action=stop --service_name=dnsmasq - # Disable the real dnsmasq service - ynh_exec_warn_less systemctl disable dnsmasq --quiet +# Disable the real dnsmasq service +#ynh_exec_warn_less systemctl disable dnsmasq --quiet - # And move the files that make the service available in systemd to really disable it - mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/.dnsmasq.service.backup_by_pihole - mv /etc/init.d/dnsmasq /etc/init.d/.dnsmasq.backup_by_pihole +# And move the files that make the service available in systemd to really disable it +#mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/.dnsmasq.service.backup_by_pihole +#mv /etc/init.d/dnsmasq /etc/init.d/.dnsmasq.backup_by_pihole - # Move dnsmasq to preserve the current binary - mv /usr/sbin/dnsmasq /usr/sbin/dnsmasq.backup_by_pihole - # Replace dnsmasq by pihole-FTL - # NOTE: pihole-FTL is actually a modified version of dnsmasq - # https://github.com/pi-hole/FTL/tree/master/dnsmasq - ln -s /usr/bin/pihole-FTL /usr/sbin/dnsmasq +# Move dnsmasq to preserve the current binary +#mv /usr/sbin/dnsmasq /usr/sbin/dnsmasq.backup_by_pihole +# Replace dnsmasq by pihole-FTL +# NOTE: pihole-FTL is actually a modified version of dnsmasq +# https://github.com/pi-hole/FTL/tree/master/dnsmasq +#ln -s /usr/bin/pihole-FTL /usr/sbin/dnsmasq - pihole_local_repo="/etc/.pihole" - cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL - chmod +x /etc/init.d/pihole-FTL - ynh_exec_warn_less systemctl enable pihole-FTL --quiet +pihole_local_repo="/etc/.pihole" +cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL +chmod +x /etc/init.d/pihole-FTL +ynh_exec_warn_less systemctl enable pihole-FTL --quiet - # Replace the service dnsmasq by pihole-FTL - # That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL - ln -s /run/systemd/generator.late/pihole-FTL.service /etc/systemd/system/dnsmasq.service +# Replace the service dnsmasq by pihole-FTL +# That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL +#ln -s /run/systemd/generator.late/pihole-FTL.service /etc/systemd/system/dnsmasq.service +systemctl mask dnsmasq.service - # Reload systemd config - systemctl daemon-reload -fi +# Reload systemd config +systemctl daemon-reload #================================================= # RESTORE DNSMASQ CONFIG @@ -218,18 +215,6 @@ do echo "$localipv4 $perdomain #Added by pihole#" >> /etc/hosts done <<< "$(yunohost domain list | grep "\." | sed 's/.*: \|.*- //')" -#================================================= -# RESTART DNSMASQ -#================================================= - -# Restart dnsmasq only for the version 3.X, otherwise we're going to restart it twice. -if [ "$pihole_version" == "Last 3.X" ] -then - ynh_script_progression --message="Restarting Dnsmasq..." - - ynh_systemd_action --action=restart --service_name=dnsmasq -fi - #================================================= # UPDATE VARIABLES FILE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9bb1904..40e6f71 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,18 +141,10 @@ pihole_local_repo="/etc/.pihole" if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=4 - if [ "$pihole_version" == "Last 3.X" ] - then - # Update the version 3.X - ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app_3 - # Update admin dashboard - ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_3 - else - # Update the last version available - ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app_last - # Update admin dashboard - ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_last - fi + # Update the last version available + ynh_setup_source --dest_dir="$pihole_local_repo" --source_id=app + # Update admin dashboard + ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard fi chown $app:www-data "$final_path" @@ -207,12 +199,7 @@ cp -a "$pihole_local_repo/advanced/bash-completion/pihole" /etc/bash_completion. #================================================= # This sudoers config allow pihole to execute /usr/local/bin/pihole as root without password. Nothing more. -if [ "$pihole_version" == "Last 3.X" ] -then - cp "$pihole_local_repo/advanced/pihole.sudo" /etc/sudoers.d/pihole -else - cp "$pihole_local_repo/advanced/Templates/pihole.sudo" /etc/sudoers.d/pihole -fi +cp "$pihole_local_repo/advanced/Templates/pihole.sudo" /etc/sudoers.d/pihole echo "$app ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole chmod 0440 /etc/sudoers.d/pihole @@ -221,14 +208,7 @@ chmod 0440 /etc/sudoers.d/pihole #================================================= pihole_storage="/etc/pihole" -if [ "$pihole_version" == "Last 3.X" ] -then - cp "$pihole_local_repo/advanced/logrotate" "$pihole_storage/logrotate" - dnsmasq_user=$(grep DNSMASQ_USER= /etc/init.d/dnsmasq | cut -d'"' -f2) -else - cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate" - dnsmasq_user=$(grep FTLUSER= /etc/init.d/pihole-FTL | cut -d'=' -f2) -fi +cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate" sed -i "/# su #/d;" "$pihole_storage/logrotate" #================================================= @@ -242,23 +222,16 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then # Get the source of Pi-Hole-FTL FTL_temp_path=$(mktemp -d) - if [ "$pihole_version" == "Last 3.X" ] - then - # Install the version 3.3.1 - ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL_3 - else - # Install the last version available - ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL_last - fi + # Install the last version available + ynh_setup_source --dest_dir="$FTL_temp_path" --source_id=FTL # Instead of downloading a binary file, we're going to compile it - ( cd "$FTL_temp_path" - if [ "$pihole_version" == "Last available" ] - then + ( + cd "$FTL_temp_path" ynh_exec_warn_less cmake . - fi - ynh_exec_warn_less make - ynh_exec_warn_less make install ) + ynh_exec_warn_less make + ynh_exec_warn_less make install + ) ynh_secure_remove --file="$FTL_temp_path" fi @@ -268,48 +241,41 @@ then ynh_add_config --template="../conf/pihole-FTL.conf" --destination="$pihole_storage/pihole-FTL.conf" fi -if [ "$pihole_version" == "Last 3.X" ] -then - # Version 3.3.1 - cp -a $pihole_local_repo/advanced/pihole-FTL.service /etc/init.d/pihole-FTL - chmod +x /etc/init.d/pihole-FTL - ynh_exec_warn_less systemctl enable pihole-FTL --quiet -else - # Last version available - # Stopped dnsmasq to replace it by pihole-FTL - ynh_systemd_action --action=stop --service_name=dnsmasq +# Last version available +# Stopped dnsmasq to replace it by pihole-FTL +ynh_systemd_action --action=stop --service_name=dnsmasq - # Disable the real dnsmasq service - ynh_exec_warn_less systemctl disable dnsmasq --quiet +# Disable the real dnsmasq service +#ynh_exec_warn_less systemctl disable dnsmasq --quiet - # And move the files that make the service available in systemd to really disable it - if [ ! -e "/lib/systemd/system/.dnsmasq.service.backup_by_pihole" ]; then - mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/.dnsmasq.service.backup_by_pihole - fi - if [ ! -e "/etc/init.d/.dnsmasq.backup_by_pihole" ]; then - mv /etc/init.d/dnsmasq /etc/init.d/.dnsmasq.backup_by_pihole - fi +# And move the files that make the service available in systemd to really disable it +#if [ ! -e "/lib/systemd/system/.dnsmasq.service.backup_by_pihole" ]; then +# mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/.dnsmasq.service.backup_by_pihole +#fi +#if [ ! -e "/etc/init.d/.dnsmasq.backup_by_pihole" ]; then +# mv /etc/init.d/dnsmasq /etc/init.d/.dnsmasq.backup_by_pihole +#fi - # Move dnsmasq to preserve the current binary - if [ ! -e "/usr/sbin/dnsmasq.backup_by_pihole" ]; then - mv /usr/sbin/dnsmasq /usr/sbin/dnsmasq.backup_by_pihole - fi - # Replace dnsmasq by pihole-FTL - # NOTE: pihole-FTL is actually a modified version of dnsmasq - # https://github.com/pi-hole/FTL/tree/master/dnsmasq - ln -sf /usr/bin/pihole-FTL /usr/sbin/dnsmasq +# Move dnsmasq to preserve the current binary +#if [ ! -e "/usr/sbin/dnsmasq.backup_by_pihole" ]; then +# mv /usr/sbin/dnsmasq /usr/sbin/dnsmasq.backup_by_pihole +#fi +# Replace dnsmasq by pihole-FTL +# NOTE: pihole-FTL is actually a modified version of dnsmasq +# https://github.com/pi-hole/FTL/tree/master/dnsmasq +#ln -sf /usr/bin/pihole-FTL /usr/sbin/dnsmasq - cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL - chmod +x /etc/init.d/pihole-FTL - ynh_exec_warn_less systemctl enable pihole-FTL --quiet +cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL +chmod +x /etc/init.d/pihole-FTL +ynh_exec_warn_less systemctl enable pihole-FTL --quiet - # Replace the service dnsmasq by pihole-FTL - # That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL - ln -sf /run/systemd/generator.late/pihole-FTL.service /etc/systemd/system/dnsmasq.service +# Replace the service dnsmasq by pihole-FTL +# That way, YunoHost can continue to use dnsmasq by actually using pihole-FTL +#ln -sf /run/systemd/generator.late/pihole-FTL.service /etc/systemd/system/dnsmasq.service +systemctl mask dnsmasq.service - # Reload systemd config - systemctl daemon-reload -fi +# Reload systemd config +systemctl daemon-reload #================================================= # BUILD VARIABLES FILE @@ -353,12 +319,7 @@ echo "$pihole_core_version $dashboard_version $FTL_version" | tee $pihole_storag # UPDATE CRON JOB #================================================= -if [ "$pihole_version" == "Last 3.X" ] -then - cp $pihole_local_repo/advanced/pihole.cron /etc/cron.d/pihole -else - cp $pihole_local_repo/advanced/Templates/pihole.cron /etc/cron.d/pihole -fi +cp $pihole_local_repo/advanced/Templates/pihole.cron /etc/cron.d/pihole # 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 @@ -372,10 +333,8 @@ yunohost service add pihole-FTL --description="PiHole backend service" --log="/v # UPDATE CONF_REGEN HOOK #================================================= -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" +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 From 16696e479b9558d57c9e1fc4eccc4c6d1f0be81f Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 6 Jan 2022 14:48:25 +0100 Subject: [PATCH 05/20] fix dnsmasq 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 e181ac4..54419ff 100755 --- a/conf/dnsmasq_regenconf_hook +++ b/conf/dnsmasq_regenconf_hook @@ -37,9 +37,10 @@ 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" +ynh_replace_string --match_string="^listen-address=" --replace_string="#pihole# listen-address=" --target_file="${pending_conf}/etc/dnsmasq.conf" -echo "conf-dir=/etc/dnsmasq.d/" >> "${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 b4403336f04f315e4100862a1f8c4eed2ef3c200 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 6 Jan 2022 13:48:31 +0000 Subject: [PATCH 06/20] Auto-update README --- README.md | 2 -- README_fr.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/README.md b/README.md index fa661f7..d09912f 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,6 @@ Use the admin panel of your Pi-hole to configure this app. You may also need to ## Limitations * Activate DHCP with Pi-hole needs manual configuration of your router. -* Pi-Hole can't be updated beyond version 3.3.1, because higher versions use an integrated version of dnsmasq. This would require disabling the version of dnsmasq used by YunoHost. - ## Using Pi-hole as your DHCP server diff --git a/README_fr.md b/README_fr.md index 89be07a..8f39f19 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,8 +30,6 @@ Utiliser le panneau d'administration de votre Pi-hole pour configurer cette appl ## Limitations * Activer DHCP avec Pi-hole nécessite une configuration manuelle de votre routeur. -* Pi-Hole ne peut pas être mis à jour au-delà de la version 3.3.1, car les versions supérieures utilisent une version intégrée de dnsmasq. Ce qui oblige a désactiver la version de dnsmasq utilisée par YunoHost. - ## Faire de Pi-hole votre serveur DHCP From 6058ffeaa00d47e91827f38919d26efe3b43065d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 08:41:21 +0100 Subject: [PATCH 07/20] 5.9 --- conf/app.src | 4 ++-- conf/nginx.conf | 2 +- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/app.src b/conf/app.src index 9615e11..f36b21e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.7.tar.gz -SOURCE_SUM=e90eb7872b213fc248f19d41ff57ddbc2c6af2287522b03c98cdfeeb9c1edfb4 +SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.9.tar.gz +SOURCE_SUM=13e7c3d7cdf19c9b9b8a449fea86d55ef68fce9b67ee3ad0429104c0ff509dde SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index b0000ac..e28ac5f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,7 +9,7 @@ location __PATH__/ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/manifest.json b/manifest.json index 18eef0b..1adf50e 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.7~ynh1", + "version": "5.9~ynh1", "url": "https://pi-hole.net/", "upstream": { "license": "EUPL-1.2", From 84ea0e674574891d7680cf20860091f60dbf987a Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 6 Mar 2022 07:41:25 +0000 Subject: [PATCH 08/20] 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 06cba8d..df5f523 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.7~ynh1 +**Shipped version:** 5.9~ynh1 diff --git a/README_fr.md b/README_fr.md index e3c788a..21238f4 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.7~ynh1 +**Version incluse :** 5.9~ynh1 From 577d1d691957ded31ef1b0f73b4ad3c06a294c1f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 08:51:31 +0100 Subject: [PATCH 09/20] Upgrade --- conf/admin_dashboard.src | 4 ++-- scripts/_common.sh | 13 +++++++++++++ scripts/actions/reset_default_app | 2 -- scripts/install | 4 +--- scripts/restore | 4 +--- scripts/upgrade | 4 +--- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/conf/admin_dashboard.src b/conf/admin_dashboard.src index 0104342..0f9db8e 100644 --- a/conf/admin_dashboard.src +++ b/conf/admin_dashboard.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.9.tar.gz -SOURCE_SUM=1c89d2786bd58c18d1072227b9509f9de26f870509b353e228b193d553a9b92e +SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.11.tar.gz +SOURCE_SUM=589ef049135a90d622fc68299140e4dc16451ce541b804b35ffa5d25201afeb4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/scripts/_common.sh b/scripts/_common.sh index 8d3534c..da847a5 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,18 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +YNH_PHP_VERSION="7.3" + +# Dependencies +pkg_dependencies="sqlite3 idn2 php${YNH_PHP_VERSION}-sqlite3 nettle-dev libcap2-bin build-essential libgmp-dev m4 cmake libidn11-dev libreadline-dev xxd" + +pihole_core_version=5.ç +dashboard_version=5.11 +FTL_version=5.14 + #================================================= # FUTUR OFFICIAL HELPERS #================================================= diff --git a/scripts/actions/reset_default_app b/scripts/actions/reset_default_app index 61a94d7..6fab71d 100755 --- a/scripts/actions/reset_default_app +++ b/scripts/actions/reset_default_app @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source scripts/_variables - source scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index e5a844b..fb870f3 100644 --- a/scripts/install +++ b/scripts/install @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source _variables - source _common.sh source /usr/share/yunohost/helpers @@ -83,7 +81,7 @@ ynh_exec_fully_quiet yunohost firewall allow Both 53 --no-upnp #================================================= ynh_script_progression --message="Installing dependencies..." --weight=12 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER diff --git a/scripts/restore b/scripts/restore index a859a31..4033e09 100644 --- a/scripts/restore +++ b/scripts/restore @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source ../settings/scripts/_variables - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -109,7 +107,7 @@ ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --dedicated_ser #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=12 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/upgrade b/scripts/upgrade index 40e6f71..4d7ad60 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source _variables - source _common.sh source /usr/share/yunohost/helpers @@ -123,7 +121,7 @@ ynh_maintenance_mode_ON #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=6 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER From 39bac26ff1c42206221b607fceb45776330759f6 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 6 Mar 2022 08:01:21 +0000 Subject: [PATCH 10/20] Auto-update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index df5f523..c08f7e4 100644 --- a/README.md +++ b/README.md @@ -17,6 +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.9~ynh1 From 6bd4236112aeacaed8a956c4ff2560557390975d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 09:02:30 +0100 Subject: [PATCH 11/20] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index bf61a67..319f747 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ YNH_PHP_VERSION="7.3" # Dependencies pkg_dependencies="sqlite3 idn2 php${YNH_PHP_VERSION}-sqlite3 nettle-dev libcap2-bin build-essential libgmp-dev m4 cmake libidn11-dev libreadline-dev xxd" -pihole_core_version=5.ç +pihole_core_version=5.9 dashboard_version=5.11 FTL_version=5.14 From 2e336768cacd3d45f2a6a4161dd4e72847bfc86f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 09:04:41 +0100 Subject: [PATCH 12/20] Create config_panel.toml.example --- config_panel.toml.example | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 config_panel.toml.example diff --git a/config_panel.toml.example b/config_panel.toml.example new file mode 100644 index 0000000..d8518a1 --- /dev/null +++ b/config_panel.toml.example @@ -0,0 +1,70 @@ +version = "0.1" +name = "PiHole configuration panel" + +[main] +name = "PiHole configuration" + + [main.overwrite_files] + name = "Overwriting config files" + + [main.overwrite_files.overwrite_setupvars] + ask = "Overwrite the config file setupVars.conf?" + type = "boolean" + default = true + help = "If the file is overwritten, a backup will be created." + + [main.overwrite_files.overwrite_ftl] + ask = "Overwrite the config file pihole-FTL.conf?" + type = "boolean" + default = true + help = "If the file is overwritten, a backup will be created." + + [main.overwrite_files.overwrite_nginx] + ask = "Overwrite the nginx config file?" + type = "boolean" + default = true + help = "If the file is overwritten, a backup will be created." + + [main.overwrite_files.overwrite_phpfpm] + ask = "Overwrite the php-fpm config file?" + type = "boolean" + default = true + help = "If the file is overwritten, a backup will be created." + + + [main.global_config] + name = "Global configuration" + + [main.global_config.email_type] + ask = "Send HTML email to admin?" + type = "boolean" + default = true + help = "Allow app scripts to send HTML mails instead of plain text." + + + [main.php_fpm_config] + name = "PHP-FPM configuration" + + [main.php_fpm_config.footprint] + ask = "Memory footprint of the service?" + choices = ["low", "medium", "high", "specific"] + default = "low" + help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.
Use specific to set a value with the following option." + + [main.php_fpm_config.free_footprint] + ask = "Memory footprint of the service?" + type = "number" + default = "0" + help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." + + [main.php_fpm_config.usage] + ask = "Expected usage of the service?" + choices = ["low", "medium", "high"] + default = "low" + help = "low: Personal usage, behind the sso. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." + + [main.php_fpm_config.force_max_children] + ask = "Force the value of pm.max_children?" + type = "number" + default = "0" + help = "Do not change this value unless you're sure about what you're doing !
pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint
You can force that value, and ignore the formula by changing the value here.
To reset to the default value, set to 0." From 7a1ed38820b51bd5b48aefacd20962ac2df55550 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 09:05:33 +0100 Subject: [PATCH 13/20] Create config --- scripts/config | 174 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 scripts/config diff --git a/scripts/config b/scripts/config new file mode 100644 index 0000000..fef8388 --- /dev/null +++ b/scripts/config @@ -0,0 +1,174 @@ +#!/bin/bash + +#================================================= +# GENERIC STARTING +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# RETRIEVE ARGUMENTS +#================================================= + +app=$YNH_APP_INSTANCE_NAME + +fpm_config_dir=$(ynh_app_setting_get --app=$app --key=fpm_config_dir) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) + +#================================================= +# SPECIFIC CODE +#================================================= +# LOAD VALUES +#================================================= + +# Load the real value from the app config or elsewhere. +# Then get the value from the form. +# If the form has a value for a variable, take the value from the form, +# Otherwise, keep the value from the app config. + +# Overwrite setupVars.conf file +old_overwrite_setupvars="$(ynh_app_setting_get --app=$app --key=overwrite_setupvars)" +overwrite_setupvars="${YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_SETUPVARS:-$old_overwrite_setupvars}" + +# Overwrite pihole-FTL.conf file +old_overwrite_ftl="$(ynh_app_setting_get --app=$app --key=overwrite_ftl)" +overwrite_ftl="${YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_FTL:-$old_overwrite_ftl}" + +# Overwrite nginx configuration +old_overwrite_nginx="$(ynh_app_setting_get --app=$app --key=overwrite_nginx)" +overwrite_nginx="${YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_NGINX:-$old_overwrite_nginx}" + +# Overwrite php-fpm configuration +old_overwrite_phpfpm="$(ynh_app_setting_get --app=$app --key=overwrite_phpfpm)" +overwrite_phpfpm="${YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_PHPFPM:-$old_overwrite_phpfpm}" + + +# Type of admin mail configuration +old_admin_mail_html="$(ynh_app_setting_get --app=$app --key=admin_mail_html)" +admin_mail_html="${YNH_CONFIG_MAIN_GLOBAL_CONFIG_EMAIL_TYPE:-$old_admin_mail_html}" + + +# Footprint for php-fpm +old_fpm_footprint="$(ynh_app_setting_get --app=$app --key=fpm_footprint)" +fpm_footprint="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FOOTPRINT:-$old_fpm_footprint}" + +# Free footprint value for php-fpm +# Check if fpm_footprint is an integer +if [ "$fpm_footprint" -eq "$fpm_footprint" ] 2> /dev/null +then + # If fpm_footprint is an integer, that's a numeric value for the footprint + old_free_footprint=$fpm_footprint + fpm_footprint=specific +else + old_free_footprint=0 +fi +free_footprint="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FREE_FOOTPRINT:-$old_free_footprint}" + +# Usage for php-fpm +old_fpm_usage="$(ynh_app_setting_get --app=$app --key=fpm_usage)" +fpm_usage="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_USAGE:-$old_fpm_usage}" + +# php_forced_max_children for php-fpm +old_php_forced_max_children="$(ynh_app_setting_get --app=$app --key=php_forced_max_children)" +# If php_forced_max_children isn't into settings.yml, get the current value from the fpm config +if [ -z "$old_php_forced_max_children" ]; then + old_php_forced_max_children="$(grep "^pm.max_children" "$fpm_config_dir/pool.d/$app.conf" | awk '{print $3}')" +fi +php_forced_max_children="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FORCE_MAX_CHILDREN:-$old_php_forced_max_children}" + +#================================================= +# SHOW_CONFIG FUNCTION FOR 'SHOW' COMMAND +#================================================= + +show_config() { + # here you are supposed to read some config file/database/other then print the values + # ynh_return "YNH_CONFIG_${PANEL_ID}_${SECTION_ID}_${OPTION_ID}=value" + + ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_SETUPVARS=$overwrite_setupvars" + ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_FTL=$overwrite_ftl" + ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_NGINX=$overwrite_nginx" + ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_PHPFPM=$overwrite_phpfpm" + + ynh_return "YNH_CONFIG_MAIN_GLOBAL_CONFIG_EMAIL_TYPE=$admin_mail_html" + + ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FOOTPRINT=$fpm_footprint" + ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FREE_FOOTPRINT=$free_footprint" + ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_USAGE=$fpm_usage" + ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FORCE_MAX_CHILDREN=$php_forced_max_children" +} + +#================================================= +# MODIFY THE CONFIGURATION +#================================================= + +apply_config() { + + #================================================= + # MODIFY OVERWRITTING SETTINGS + #================================================= + + # Set overwrite_setupvars + ynh_app_setting_set --app=$app --key=overwrite_setupvars --value="$overwrite_setupvars" + # Set overwrite_ftl + ynh_app_setting_set --app=$app --key=overwrite_ftl --value="$overwrite_ftl" + # Set overwrite_nginx + ynh_app_setting_set --app=$app --key=overwrite_nginx --value="$overwrite_nginx" + # Set overwrite_phpfpm + ynh_app_setting_set --app=$app --key=overwrite_phpfpm --value="$overwrite_phpfpm" + + #================================================= + # MODIFY EMAIL SETTING + #================================================= + + # Set admin_mail_html + ynh_app_setting_set --app=$app --key=admin_mail_html --value="$admin_mail_html" + + #================================================= + # RECONFIGURE PHP-FPM + #================================================= + + if [ "$fpm_usage" != "$old_fpm_usage" ] || \ + [ "$fpm_footprint" != "$old_fpm_footprint" ] || \ + [ "$free_footprint" != "$old_free_footprint" ] || \ + [ "$php_forced_max_children" != "$old_php_forced_max_children" ] + then + # If fpm_footprint is set to 'specific', use $free_footprint value. + if [ "$fpm_footprint" = "specific" ] + then + fpm_footprint=$free_footprint + fi + + if [ "$php_forced_max_children" != "$old_php_forced_max_children" ] + then + # Set php_forced_max_children + if [ $php_forced_max_children -ne 0 ] + then + ynh_app_setting_set --app=$app --key=php_forced_max_children --value="$php_forced_max_children" + else + # If the value is set to 0, remove the setting + ynh_app_setting_delete --app=$app --key=php_forced_max_children + fi + fi + + if [ "$fpm_footprint" != "0" ] + then + ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --dedicated_service + else + ynh_print_err --message="When selecting 'specific', you have to set a footprint value into the field below." + fi + fi +} + +#================================================= +# GENERIC FINALIZATION +#================================================= +# SELECT THE ACTION FOLLOWING THE GIVEN ARGUMENT +#================================================= + +case $1 in + show) show_config;; + apply) apply_config;; +esac From 6d01718a2778970b1680f69d22cf44726c092b3c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 09:08:55 +0100 Subject: [PATCH 14/20] Update check_process --- check_process | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index 020c8a2..054012c 100644 --- a/check_process +++ b/check_process @@ -23,6 +23,7 @@ setup_private=1 setup_public=0 upgrade=1 + upgrade=1 from_commit=cfa9c5a3dbcfb765dcca3b2e7d179756afe26def backup_restore=1 multi_instance=0 port_already_use=1 @@ -31,4 +32,7 @@ config_panel=1 ;;; Options Email= -Notification=change +Notification=none +;;; Upgrade options + ; commit=cfa9c5a3dbcfb765dcca3b2e7d179756afe26def + name=Merge pull request #66 From d5236879f56d446bd61d29418bd53e120023feff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 09:11:17 +0100 Subject: [PATCH 15/20] Create actions.toml --- actions.toml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 actions.toml diff --git a/actions.toml b/actions.toml new file mode 100644 index 0000000..71fd449 --- /dev/null +++ b/actions.toml @@ -0,0 +1,45 @@ +[reset_default_setupvars] +name = "Reset the config file and restore a default one." +command = "/bin/bash scripts/actions/reset_default_config \"setupVars.conf\"" +# user = "root" # optional +# cwd = "/" # optional +# accepted_return_codes = [0, 1, 2, 3] # optional +accepted_return_codes = [0] +description = "Reset the config file setupVars.conf." + +[reset_default_ftl] +name = "Reset the config file and restore a default one." +command = "/bin/bash scripts/actions/reset_default_config \"pihole-FTL.conf\"" +# user = "root" # optional +# cwd = "/" # optional +# accepted_return_codes = [0, 1, 2, 3] # optional +accepted_return_codes = [0] +description = "Reset the config file pihole-FTL.conf." + +[reset_default_nginx] +name = "Reset the nginx config for this app." +command = "/bin/bash scripts/actions/reset_default_system nginx" +# user = "root" # optional +# cwd = "/" # optional +# accepted_return_codes = [0, 1, 2, 3] # optional +accepted_return_codes = [0] +description = "Reset the nginx config for this app." + +[reset_default_phpfpm] +name = "Reset the php-fpm config for this app." +command = "/bin/bash scripts/actions/reset_default_system phpfpm" +# user = "root" # optional +# cwd = "/" # optional +# accepted_return_codes = [0, 1, 2, 3] # optional +accepted_return_codes = [0] +description = "Reset the php-fpm config for this app." + + +[reset_default_app] +name = "Reset the app with a default configuration." +command = "/bin/bash scripts/actions/reset_default_app" +# user = "root" # optional +# cwd = "/" # optional +# accepted_return_codes = [0, 1, 2, 3] # optional +accepted_return_codes = [0] +description = "Reset the app to its default configuration to try to fix potential issues.
This action won't remove any data added to the app.
However, if you have modified any configuration, it will be overwritten." From a85cd67c00bdaca309f22366972f28011c2b6594 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 18:21:28 +0100 Subject: [PATCH 16/20] Update check_process --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 054012c..8081413 100644 --- a/check_process +++ b/check_process @@ -28,8 +28,8 @@ multi_instance=0 port_already_use=1 change_url=1 - actions=1 - config_panel=1 + actions=0 + config_panel=0 ;;; Options Email= Notification=none From 174dc620015fa69f132f4d1ca819efbf14f349c3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 20 Mar 2022 13:58:56 +0100 Subject: [PATCH 17/20] Cleaning up --- doc/DESCRIPTION.md | 2 +- scripts/_variables | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 scripts/_variables diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index a88ba06..819bf5b 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1 @@ -Network-wide ad blocking via your own DNS server +The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software. \ No newline at end of file diff --git a/scripts/_variables b/scripts/_variables deleted file mode 100644 index b613306..0000000 --- a/scripts/_variables +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Dependencies -app_depencencies="sqlite3 idn2 php7.3-sqlite3 nettle-dev libcap2-bin build-essential libgmp-dev m4 cmake libidn11-dev libreadline-dev xxd" - -pihole_core_version=5.6 -dashboard_version=5.8 -FTL_version=5.11 From e6404a3b72cac03b1965262fb76f52126f004e09 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 20 Mar 2022 12:59:00 +0000 Subject: [PATCH 18/20] 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 c08f7e4..9befe0c 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Network-wide ad blocking via your own DNS server - +The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software. **Shipped version:** 5.9~ynh1 diff --git a/README_fr.md b/README_fr.md index b122c05..5ecc46d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,8 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Network-wide ad blocking via your own DNS server - +The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software. **Version incluse :** 5.9~ynh1 From 81d16e9d83ed60564bc37a8a1780349e79572914 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 May 2022 14:12:14 +0200 Subject: [PATCH 19/20] 5.10 --- conf/admin_dashboard.src | 4 ++-- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/admin_dashboard.src b/conf/admin_dashboard.src index 0f9db8e..0013f5c 100644 --- a/conf/admin_dashboard.src +++ b/conf/admin_dashboard.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.11.tar.gz -SOURCE_SUM=589ef049135a90d622fc68299140e4dc16451ce541b804b35ffa5d25201afeb4 +SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.12.tar.gz +SOURCE_SUM=c770daaf5360c659ab3b9c07a118f0170307dd1e7857ece5d02ef5e3f1ead057 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app.src b/conf/app.src index f36b21e..dc69b66 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.9.tar.gz -SOURCE_SUM=13e7c3d7cdf19c9b9b8a449fea86d55ef68fce9b67ee3ad0429104c0ff509dde +SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.10.tar.gz +SOURCE_SUM=fb995f62ab83713222d538e0836557de651a94f61622bf930aa88187b70ae2ee SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 5fff289..a7e68f9 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.9~ynh1", + "version": "5.10~ynh1", "url": "https://pi-hole.net/", "upstream": { "license": "EUPL-1.2", From bd822cae1c9032f93dea169beb1257c2aab2f4b0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 7 May 2022 12:12:20 +0000 Subject: [PATCH 20/20] 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 9befe0c..7318da4 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 The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software. -**Shipped version:** 5.9~ynh1 +**Shipped version:** 5.10~ynh1 diff --git a/README_fr.md b/README_fr.md index 5ecc46d..d3d3820 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 The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software. -**Version incluse :** 5.9~ynh1 +**Version incluse :** 5.10~ynh1