mirror of
https://github.com/hassio-addons/addon-pi-hole.git
synced 2025-05-07 04:11:22 +00:00
🔨 Updates for upstream Supervisor changes
This commit is contained in:
parent
dd20da9c4f
commit
bb5e37cc0c
6 changed files with 14 additions and 14 deletions
|
@ -6,7 +6,7 @@
|
|||
declare api_port
|
||||
declare admin_port
|
||||
declare certfile
|
||||
declare hassio_dns
|
||||
declare dns_host
|
||||
declare ingress_interface
|
||||
declare ingress_port
|
||||
declare ingress_url
|
||||
|
@ -44,6 +44,6 @@ if bashio::var.has_value "${api_port}"; then
|
|||
sed -i "s/%%api_port%%/${api_port}/g" /etc/nginx/servers/api.conf
|
||||
fi
|
||||
|
||||
hassio_dns=$(bashio::dns.host)
|
||||
sed -i "s/%%hassio_dns%%/${hassio_dns}/g" /etc/nginx/includes/resolver.conf
|
||||
dns_host=$(bashio::dns.host)
|
||||
sed -i "s/%%dns_host%%/${dns_host}/g" /etc/nginx/includes/resolver.conf
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ declare ips
|
|||
declare result
|
||||
declare port
|
||||
declare name
|
||||
declare hassio_dns
|
||||
declare dns_host
|
||||
|
||||
# Allow dnsmasq to bind on ports < 1024
|
||||
setcap CAP_NET_ADMIN,CAP_NET_BIND_SERVICE,CAP_NET_RAW=+eip "$(command -v pihole-FTL)"
|
||||
|
@ -30,9 +30,9 @@ if ! bashio::fs.directory_exists '/data/dnsmasq.d'; then
|
|||
fi
|
||||
|
||||
bashio::log.debug 'Setting up list of known DNS servers'
|
||||
hassio_dns=$(bashio::dns.host)
|
||||
dns_host=$(bashio::dns.host)
|
||||
cp /etc/pihole/dns-servers.conf /data/pihole/dns-servers.conf
|
||||
sed -i "s/%%hassio_dns%%/${hassio_dns}/g" /etc/pihole/dns-servers.conf
|
||||
sed -i "s/%%dns_host%%/${dns_host}/g" /etc/pihole/dns-servers.conf
|
||||
|
||||
bashio::log.debug 'Symlinking configuration'
|
||||
rm -fr /etc/dnsmasq.d
|
||||
|
|
|
@ -1 +1 @@
|
|||
resolver %%hassio_dns%%;
|
||||
resolver %%dns_host%%;
|
||||
|
|
|
@ -36,7 +36,7 @@ function authenticate()
|
|||
body = ngx.encode_args({["username"]=username, ["password"]=password}),
|
||||
headers = {
|
||||
["Content-Type"] = "application/x-www-form-urlencoded",
|
||||
["X-HASSIO-KEY"] = os.getenv("HASSIO_TOKEN"),
|
||||
["X-Supervisor-Token"] = os.getenv("SUPERVISOR_TOKEN"),
|
||||
},
|
||||
keepalive_timeout = 60,
|
||||
keepalive_pool = 10
|
||||
|
|
|
@ -17,7 +17,7 @@ pcre_jit on;
|
|||
error_log /proc/1/fd/1 error;
|
||||
|
||||
# Load allowed environment vars
|
||||
env HASSIO_TOKEN;
|
||||
env SUPERVISOR_TOKEN;
|
||||
env DISABLE_HA_AUTHENTICATION;
|
||||
|
||||
# Load dynamic modules.
|
||||
|
@ -31,11 +31,11 @@ events {
|
|||
http {
|
||||
include /etc/nginx/includes/mime.types;
|
||||
|
||||
log_format hassio '[$time_local] $status '
|
||||
'$http_x_forwarded_for($remote_addr) '
|
||||
'$request ($http_user_agent)';
|
||||
log_format homeassistant '[$time_local] $status '
|
||||
'$http_x_forwarded_for($remote_addr) '
|
||||
'$request ($http_user_agent)';
|
||||
|
||||
access_log /proc/1/fd/1 hassio;
|
||||
access_log /proc/1/fd/1 homeassistant;
|
||||
client_max_body_size 4G;
|
||||
default_type application/octet-stream;
|
||||
gzip on;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Hass.io DNS;%%hassio_dns%%;;
|
||||
Home Assistant DNS;%%dns_host%%;;
|
||||
Google (ECS);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
|
||||
OpenDNS (ECS);208.67.222.222;208.67.220.220;2620:0:ccc::2;2620:0:ccd::2
|
||||
Level3;4.2.2.1;4.2.2.2;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue