Browse Source

Merge pull request #71 from YunoHost-Apps/5.6

5.6
Alexandre Aubin 4 years ago
parent
commit
4a718fcd39

+ 2 - 3
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.4~ynh1
+**Shipped version:** 5.6~ynh1
 
 
 
@@ -37,8 +37,7 @@ Use the admin panel of your Pi-hole to configure this app. You may also need to
 * 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
-==================
+## 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.  

+ 3 - 4
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.4~ynh1
+**Version incluse :** 5.6~ynh1
 
 
 
@@ -25,7 +25,7 @@ Filtrage publicitaire via votre propre serveur DNS
 
 ## Configuration
 
-Utiliser le panneau d'administration de votre Pi-hole pour configurer cette application. Vous devrez peut-être aussi suivre le [guide de post-installation] (https://docs.pi-hole.net/main/post-install/) pour configurer Pi-hole en tant que *serveur DNS* ou *serveur DHCP*.
+Utiliser le panneau d'administration de votre Pi-hole pour configurer cette application. Vous devrez peut-être aussi suivre le [guide de post-installation](https://docs.pi-hole.net/main/post-install/) pour configurer Pi-hole en tant que *serveur DNS* ou *serveur DHCP*.
 
 ## Limitations
 
@@ -33,8 +33,7 @@ Utiliser le panneau d'administration de votre Pi-hole pour configurer cette appl
 * 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
-==================
+## 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.  

+ 0 - 1
conf/FTL_3.src

@@ -3,4 +3,3 @@ SOURCE_SUM=8c3d55eb3054698172e59ae81b8562ce235d73da461389840da62d90b32f0057
 SOURCE_SUM_PRG=sha256sum
 SOURCE_FORMAT=tar.gz
 SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=

+ 2 - 2
conf/FTL_last.src

@@ -1,5 +1,5 @@
-SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.9.tar.gz
-SOURCE_SUM=e10009f57a52434c70f6ca3abcac01b8a6a4365b8b257e9d1bdd2f6c3d509bc2
+SOURCE_URL=https://github.com/pi-hole/FTL/archive/v5.11.tar.gz
+SOURCE_SUM=e7f1ec8b12629ae4b1b5453f18f5247cb7c68037094c6cf7f8e046e18ce2c283
 SOURCE_SUM_PRG=sha256sum
 SOURCE_FORMAT=tar.gz
 SOURCE_IN_SUBDIR=true

+ 0 - 6
conf/adlists.default

@@ -3,9 +3,6 @@
 ##StevenBlack's list
 https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
 
-##MalwareDomains
-https://mirror1.malwaredomains.com/files/justdomains
-
 ##Cameleon
 http://sysctl.org/cameleon/hosts
 
@@ -14,6 +11,3 @@ https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
 
 ##Disconnect.me Ads
 https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
-
-##Hosts-file.net
-https://hosts-file.net/ad_servers.txt

+ 0 - 1
conf/admin_dashboard_3.src

@@ -3,4 +3,3 @@ SOURCE_SUM=caba2129fe8753b0c7aaf611b7c7b2146ff1ac56d5ac58987053b1553d09c49f
 SOURCE_SUM_PRG=sha256sum
 SOURCE_FORMAT=tar.gz
 SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=

+ 2 - 3
conf/admin_dashboard_last.src

@@ -1,6 +1,5 @@
-SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.6.tar.gz
-SOURCE_SUM=1b959de820fa9fb39999f5244a0201d26a1df9846ad3151dc6d66dd8fdda92dd
+SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v5.8.tar.gz
+SOURCE_SUM=b594374bd3d6361ad5fa35958b17a08965fcc77d3ef4c4a7938410116b0cf5be
 SOURCE_SUM_PRG=sha256sum
 SOURCE_FORMAT=tar.gz
 SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=

+ 2 - 3
conf/app_last.src

@@ -1,6 +1,5 @@
-SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.4.tar.gz
-SOURCE_SUM=dc82465f3b257d170cd0089a249bdee5378a8f52166ae95d1d7dc00512ef505c
+SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v5.6.tar.gz
+SOURCE_SUM=c65f31418bdbfbf9ed482e5380f0b7f8370e69817dd1db70bea98f337198bf47
 SOURCE_SUM_PRG=sha256sum
 SOURCE_FORMAT=tar.gz
 SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=

+ 0 - 5
conf/nginx.conf

@@ -4,11 +4,6 @@ location __PATH__/ {
     # Path to source
     alias __FINALPATH__/;
 
-    # Force usage of https
-    if ($scheme = http) {
-        rewrite ^ https://$server_name$request_uri? permanent;
-    }
-
     index index.html index.php ;
 
     try_files $uri $uri/ index.php;

+ 4 - 5
config_panel.toml

@@ -1,5 +1,4 @@
-version = "0.1"
-name = "PiHole configuration panel"
+version = "1.0"
 
 [main]
 name = "PiHole configuration"
@@ -26,7 +25,7 @@ name = "PiHole configuration"
         help = "If the file is overwritten, a backup will be created."
 
         [main.overwrite_files.overwrite_phpfpm]
-        ask = "Overwrite the php-fpm config file?"
+        ask = "Overwrite the PHP-FPM config file?"
         type = "boolean"
         default = true
         help = "If the file is overwritten, a backup will be created."
@@ -61,10 +60,10 @@ name = "PiHole configuration"
         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.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding."
+        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.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>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 !<br>pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint<br>You can force that value, and ignore the formula by changing the value here.<br>To reset to the default value, set to 0."
+        help = "Do not change this value unless you're sure about what you're doing!<br>pm.max_children is automatically defined by this formula: $max_ram / 2 / $footprint<br>You can force that value, and ignore the formula by changing the value here.<br>To reset to the default value, set to 0."

+ 1 - 2
doc/DISCLAIMER.md

@@ -8,8 +8,7 @@ Use the admin panel of your Pi-hole to configure this app. You may also need to
 * 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
-==================
+## 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.  

+ 2 - 3
doc/DISCLAIMER_fr.md

@@ -1,6 +1,6 @@
 ## Configuration
 
-Utiliser le panneau d'administration de votre Pi-hole pour configurer cette application. Vous devrez peut-être aussi suivre le [guide de post-installation] (https://docs.pi-hole.net/main/post-install/) pour configurer Pi-hole en tant que *serveur DNS* ou *serveur DHCP*.
+Utiliser le panneau d'administration de votre Pi-hole pour configurer cette application. Vous devrez peut-être aussi suivre le [guide de post-installation](https://docs.pi-hole.net/main/post-install/) pour configurer Pi-hole en tant que *serveur DNS* ou *serveur DHCP*.
 
 ## Limitations
 
@@ -8,8 +8,7 @@ Utiliser le panneau d'administration de votre Pi-hole pour configurer cette appl
 * 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
-==================
+## 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.  

+ 2 - 2
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.4~ynh1",
+    "version": "5.6~ynh1",
     "url": "https://pi-hole.net/",
     "upstream": {
         "license": "EUPL-1.2",
@@ -24,7 +24,7 @@
         "email": "maniackc_dev@crudelis.fr"
     }],
     "requirements": {
-        "yunohost": ">= 4.2.7"
+        "yunohost": ">= 4.3.0"
     },
     "multi_instance": false,
     "services": [

+ 3 - 3
scripts/_variables

@@ -9,7 +9,7 @@ then
     dashboard_version=3.3
     FTL_version=3.0
 else
-    pihole_core_version=5.4
-    dashboard_version=5.6
-    FTL_version=5.9
+    pihole_core_version=5.6
+    dashboard_version=5.8
+    FTL_version=5.11
 fi

+ 3 - 7
scripts/config

@@ -9,6 +9,8 @@
 source _common.sh
 source /usr/share/yunohost/helpers
 
+ynh_abort_if_errors
+
 #=================================================
 # RETRIEVE ARGUMENTS
 #=================================================
@@ -165,10 +167,4 @@ apply_config() {
 #=================================================
 # GENERIC FINALIZATION
 #=================================================
-# SELECT THE ACTION FOLLOWING THE GIVEN ARGUMENT
-#=================================================
-
-case $1 in
-    show) show_config;;
-    apply) apply_config;;
-esac
+ynh_app_config_run $1

+ 3 - 3
scripts/install

@@ -121,7 +121,7 @@ chown $app:www-data "$final_path"
 #=================================================
 # NGINX CONFIGURATION
 #=================================================
-ynh_script_progression --message="Configuring nginx web server..." --weight=2
+ynh_script_progression --message="Configuring NGINX web server..." --weight=2
 
 # Create a dedicated nginx config
 ynh_add_nginx_config
@@ -129,7 +129,7 @@ ynh_add_nginx_config
 #=================================================
 # PHP-FPM CONFIGURATION
 #=================================================
-ynh_script_progression --message="Configuring php-fpm..." --weight=2
+ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
 
 # Create a dedicated php-fpm config
 ynh_add_fpm_config --usage=low --footprint=low --dedicated_service
@@ -293,7 +293,7 @@ ynh_store_file_checksum --file="$setupVars"
 #=================================================
 # CONFIGURE DNS FOR THE LOCAL DOMAINS
 #=================================================
-ynh_script_progression --message="Configuring dns for the local domains..." --weight=7
+ynh_script_progression --message="Configuring DNS for the local domains..." --weight=7
 
 # Find the IP associated to the network interface
 localipv4=$(ip address | grep "${main_iface}\$" | awk '{print $2;}' | cut -d/ -f1)

+ 4 - 2
scripts/upgrade

@@ -372,8 +372,10 @@ yunohost service add pihole-FTL --description="PiHole backend service" --log="/v
 # UPDATE CONF_REGEN HOOK
 #=================================================
 
-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"
+ynh_add_config --template="../conf/dnsmasq_regenconf_hook" --destination="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
+
+#cp ../conf/dnsmasq_regenconf_hook /usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
+#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
 
 systemctl daemon-reload
 ynh_exec_warn_less yunohost tools regen-conf dnsmasq