1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pihole_ynh.git synced 2024-09-03 20:05:58 +02:00

Merge pull request #66 from YunoHost-Apps/testing

Testing
This commit is contained in:
Kayou 2021-09-21 18:28:33 +02:00 committed by GitHub
commit cfa9c5a3db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 25 additions and 13 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Network-wide ad blocking via your own DNS server
**Shipped version:** 5.3.1~ynh1
**Shipped version:** 5.4~ynh1

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Filtrage publicitaire via votre propre serveur DNS
**Version incluse :** 5.3.1~ynh1
**Version incluse :** 5.4~ynh1

View file

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

View file

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

View file

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

View file

@ -16,12 +16,15 @@ pending_conf=$4/../dnsmasq
dnsmasq_dir="${pending_conf}/etc/dnsmasq.d"
mkdir -p "$dnsmasq_dir"
main_iface=$(ip route | grep --max-count=1 default | awk '{print $5;}')
cp -a "/etc/.pihole/advanced/01-pihole.conf" "$dnsmasq_dir/"
ynh_replace_string --match_string="@DNS1@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf"
ynh_replace_string --match_string="@DNS2@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf"
ynh_replace_string --match_string="^no-resolv" --replace_string="#no-resolv" --target_file="$dnsmasq_dir/01-pihole.conf"
ynh_replace_string --match_string="@INT@" --replace_string="$main_iface" --target_file="$dnsmasq_dir/01-pihole.conf"
ynh_replace_string --match_string="@CACHE_SIZE@" --replace_string="1000" --target_file="$dnsmasq_dir/01-pihole.conf"
query_logging=$(ynh_app_setting_get --app=$app --key=query_logging)
if [ "$query_logging" = "true" ]; then
ynh_replace_string --match_string="^#log-queries" --replace_string="log-queries" --target_file="$dnsmasq_dir/01-pihole.conf"
@ -34,6 +37,9 @@ fi
#
ynh_replace_string --match_string="^cache-size=" --replace_string="#pihole# cache-size=" --target_file="${pending_conf}/etc/dnsmasq.conf"
ynh_replace_string --match_string="^listen-address=" --replace_string="#pihole# cache-size=" --target_file="${pending_conf}/etc/dnsmasq.conf"
echo "conf-dir=/etc/dnsmasq.d/" >> "${pending_conf}/etc/dnsmasq.conf"
#
# Regen /etc/dnsmasq.d/02-pihole-dhcp.conf
@ -44,7 +50,6 @@ if [ $enable_dhcp -eq 1 ]
then
# Get the default network interface
main_iface=$(ip route | grep --max-count=1 default | awk '{print $5;}')
# Find the IP associated to the network interface
localipv4=$(ip address | grep "${main_iface}\$" | awk '{print $2;}' | cut -d/ -f1)

View file

@ -6,7 +6,7 @@
"en": "Network-wide ad blocking via your own DNS server",
"fr": "Filtrage publicitaire via votre propre serveur DNS"
},
"version": "5.3.1~ynh1",
"version": "5.4~ynh1",
"url": "https://pi-hole.net/",
"upstream": {
"license": "EUPL-1.2",

View file

@ -9,7 +9,7 @@ then
dashboard_version=3.3
FTL_version=3.0
else
pihole_core_version=5.3.1
dashboard_version=5.5
FTL_version=5.8.1
pihole_core_version=5.4
dashboard_version=5.6
FTL_version=5.9
fi

View file

@ -342,6 +342,13 @@ then
ynh_store_file_checksum --file="$setupVars"
fi
#=================================================
# SET VERSIONS FOR THE FOOTER OF THE WEB INTERFACE
#=================================================
echo "master master master" > $pihole_storage/localbranches
echo "$pihole_core_version $dashboard_version $FTL_version" | tee $pihole_storage/{GitHubVersions,localversions} > /dev/null
#=================================================
# UPDATE CRON JOB
#=================================================