mirror of
https://github.com/YunoHost-Apps/pihole_ynh.git
synced 2024-09-03 20:05:58 +02:00
commit
7a5ae0cb2f
10 changed files with 77 additions and 12 deletions
|
@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
||||||
## Overview
|
## Overview
|
||||||
Network-wide ad blocking via your own Linux hardware
|
Network-wide ad blocking via your own Linux hardware
|
||||||
|
|
||||||
**Shipped version:** 3.1.4
|
**Shipped version:** 3.3
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ Use the admin panel of your Pi-hole to configure this app.
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
* Activate DHCP with Pi-hole need a manuel configuration of your router.
|
* Activate DHCP with Pi-hole need a manuel configuration of your router.
|
||||||
|
* Pi-Hole-FTL can't be upgrade above the version 2.13.2, because of the usage of an option of dnsmasq not yet available on Jessie.
|
||||||
|
|
||||||
## Additionnal informations
|
## Additionnal informations
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst
|
||||||
## Résumé
|
## Résumé
|
||||||
Blocage des publicités sur l'ensemble du réseau via votre propre matériel Linux
|
Blocage des publicités sur l'ensemble du réseau via votre propre matériel Linux
|
||||||
|
|
||||||
**Version embarquée:** 3.1.4
|
**Version embarquée:** 3.3
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ Utiliser le panneau d'administration de votre Pi-hole pour configurer cette appl
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
* Activer DHCP avec Pi-hole nécessite une configuration manuelle de votre routeur.
|
* Activer DHCP avec Pi-hole nécessite une configuration manuelle de votre routeur.
|
||||||
|
* Pi-Hole-FTL ne peut pas être mis à jour au-delà de la version 2.13.2, à cause de l'utilisation d'une option de dnsmasq non encore disponible sur Jessie.
|
||||||
|
|
||||||
## Informations additionnelles
|
## Informations additionnelles
|
||||||
|
|
||||||
|
|
9
conf/FTL.src
Normal file
9
conf/FTL.src
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
SOURCE_URL=https://github.com/pi-hole/FTL/archive/v2.13.2.tar.gz
|
||||||
|
SOURCE_SUM=07383d2b3de1ef31526b090603e783b3
|
||||||
|
SOURCE_SUM_PRG=md5sum
|
||||||
|
SOURCE_FORMAT=tar.gz
|
||||||
|
SOURCE_IN_SUBDIR=true
|
||||||
|
SOURCE_FILENAME=
|
||||||
|
|
||||||
|
# Be carrefull, the version 3.0 isn't compatible with the version of dnsmasq available on Jessie.
|
||||||
|
# So, we need to stay stick on the version 2.13.2.
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v3.1.tar.gz
|
SOURCE_URL=https://github.com/pi-hole/AdminLTE/archive/v3.3.tar.gz
|
||||||
SOURCE_SUM=2c0bf61ec96bdb85edeb9fd2cc2f330b
|
SOURCE_SUM=23368537fa576480e45f625b5e1a7cd7
|
||||||
SOURCE_SUM_PRG=md5sum
|
SOURCE_SUM_PRG=md5sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v3.1.4.tar.gz
|
SOURCE_URL=https://github.com/pi-hole/pi-hole/archive/v3.3.tar.gz
|
||||||
SOURCE_SUM=e231722332116b7ffab316d5c66a828e
|
SOURCE_SUM=6d4eb0905cf5eb03f16cd8080a66c6f4
|
||||||
SOURCE_SUM_PRG=md5sum
|
SOURCE_SUM_PRG=md5sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
31
conf/pihole-FTL.conf
Normal file
31
conf/pihole-FTL.conf
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Listen only for local socket connections or permit all connections
|
||||||
|
# localonly|all
|
||||||
|
SOCKET_LISTENING=localonly
|
||||||
|
|
||||||
|
# Display all queries? Set to no to hide query display
|
||||||
|
# yes|no
|
||||||
|
QUERY_DISPLAY=yes
|
||||||
|
|
||||||
|
# Allow FTL to analyze AAAA queries from pihole.log?
|
||||||
|
# yes|no
|
||||||
|
AAAA_QUERY_ANALYSIS=yes
|
||||||
|
|
||||||
|
# How long should queries be stored in the database? Setting this to 0 disables the database altogether
|
||||||
|
MAXDBDAYS=365
|
||||||
|
|
||||||
|
# Should FTL try to resolve IPv6 addresses to host names?
|
||||||
|
# yes|no
|
||||||
|
RESOLVE_IPV6=yes
|
||||||
|
|
||||||
|
# Should FTL try to resolve IPv4 addresses to host names?
|
||||||
|
# yes|no
|
||||||
|
RESOLVE_IPV4=yes
|
||||||
|
|
||||||
|
# How often do we store queries in FTL's database [minutes]?
|
||||||
|
DBINTERVAL=1.0
|
||||||
|
|
||||||
|
# Specify path and filename of FTL's SQLite long-term database. Setting this to DBFILE= disables the database altogether
|
||||||
|
DBFILE=/etc/pihole/pihole-FTL.db
|
||||||
|
|
||||||
|
# Up to how many hours of queries should be imported from the database and logs? Maximum is 744 (31 days)
|
||||||
|
MAXLOGAGE=24.0
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Network-wide ad blocking via your own DNS server.",
|
"en": "Network-wide ad blocking via your own DNS server.",
|
||||||
"fr": "Filtrage publicitaire sur l'ensemble du réseau via votre propre serveur DNS."
|
"fr": "Filtrage publicitaire sur l'ensemble du réseau via votre propre serveur DNS."
|
||||||
},
|
},
|
||||||
"version": "3.1.4~ynh2",
|
"version": "3.3~ynh1",
|
||||||
"url": "https://pi-hole.net/",
|
"url": "https://pi-hole.net/",
|
||||||
"license": "EUPL-1.2",
|
"license": "EUPL-1.2",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
app_depencencies="dhcpcd5"
|
app_depencencies="dhcpcd5 sqlite php5-sqlite idn2"
|
||||||
|
|
|
@ -166,11 +166,18 @@ sed -i "/# su #/d;" "$pihole_storage/logrotate"
|
||||||
# INSTALLATION OF PIHOLE-FTL
|
# INSTALLATION OF PIHOLE-FTL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
git clone https://github.com/pi-hole/FTL
|
# Get the source of Pi-Hole-FTL
|
||||||
|
FTL_temp_path=$(mktemp -d)
|
||||||
|
ynh_setup_source "$FTL_temp_path" FTL
|
||||||
|
|
||||||
# Plutôt que télécharger le binaire C, on le compile nous-même.
|
# Plutôt que télécharger le binaire C, on le compile nous-même.
|
||||||
( cd FTL
|
( cd "$FTL_temp_path"
|
||||||
ynh_exec_warn_less make
|
ynh_exec_warn_less make
|
||||||
ynh_exec_warn_less make install )
|
ynh_exec_warn_less make install )
|
||||||
|
ynh_secure_remove "$FTL_temp_path"
|
||||||
|
|
||||||
|
cp "../conf/pihole-FTL.conf" "$pihole_storage"
|
||||||
|
|
||||||
cp -a $pihole_local_repo/advanced/pihole-FTL.service /etc/init.d/pihole-FTL
|
cp -a $pihole_local_repo/advanced/pihole-FTL.service /etc/init.d/pihole-FTL
|
||||||
chmod +x /etc/init.d/pihole-FTL
|
chmod +x /etc/init.d/pihole-FTL
|
||||||
ynh_exec_warn_less systemctl enable pihole-FTL
|
ynh_exec_warn_less systemctl enable pihole-FTL
|
||||||
|
@ -218,6 +225,9 @@ else
|
||||||
ynh_replace_string "^log-queries" "#log-queries" $pihole_dnsmasq_config
|
ynh_replace_string "^log-queries" "#log-queries" $pihole_dnsmasq_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fix a too recent option for our dnsmasq version.
|
||||||
|
ynh_replace_string "log-queries=extra" "log-queries" $pihole_dnsmasq_config
|
||||||
|
|
||||||
ynh_store_file_checksum "$pihole_dnsmasq_config" # Enregistre la somme de contrôle du fichier de config
|
ynh_store_file_checksum "$pihole_dnsmasq_config" # Enregistre la somme de contrôle du fichier de config
|
||||||
|
|
||||||
# Pour éviter un conflit entre les config de dnsmasq, il faut commenter cache-size dans la config par défaut.
|
# Pour éviter un conflit entre les config de dnsmasq, il faut commenter cache-size dans la config par défaut.
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
# Load common variables for all scripts.
|
||||||
|
source _variables
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
|
@ -49,6 +51,12 @@ path_url=$(ynh_normalize_url_path $path_url) # Vérifie et corrige la syntaxe du
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $app_depencencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -123,11 +131,16 @@ sed -i "/# su #/d;" "$pihole_storage/logrotate"
|
||||||
|
|
||||||
systemctl stop pihole-FTL
|
systemctl stop pihole-FTL
|
||||||
|
|
||||||
git clone https://github.com/pi-hole/FTL
|
# Get the source of Pi-Hole-FTL
|
||||||
|
FTL_temp_path=$(mktemp -d)
|
||||||
|
ynh_setup_source "$FTL_temp_path" FTL
|
||||||
|
|
||||||
# Plutôt que télécharger le binaire C, on le compile nous-même.
|
# Plutôt que télécharger le binaire C, on le compile nous-même.
|
||||||
( cd FTL
|
( cd "$FTL_temp_path"
|
||||||
ynh_exec_warn_less make
|
ynh_exec_warn_less make
|
||||||
ynh_exec_warn_less make install )
|
ynh_exec_warn_less make install )
|
||||||
|
ynh_secure_remove "$FTL_temp_path"
|
||||||
|
|
||||||
cp -a $pihole_local_repo/advanced/pihole-FTL.service /etc/init.d/pihole-FTL
|
cp -a $pihole_local_repo/advanced/pihole-FTL.service /etc/init.d/pihole-FTL
|
||||||
chmod +x /etc/init.d/pihole-FTL
|
chmod +x /etc/init.d/pihole-FTL
|
||||||
ynh_exec_warn_less systemctl enable pihole-FTL
|
ynh_exec_warn_less systemctl enable pihole-FTL
|
||||||
|
|
Loading…
Add table
Reference in a new issue