Migrated unbound process handling to s6 and updated to latest pihole (#119)
* one-container: Migrated unbound to s6 supervise, update to latest pihole base image * Added unbound-run file for S6
This commit is contained in:
parent
d7741de332
commit
0206d8049a
5 changed files with 32 additions and 9 deletions
|
@ -1,10 +1,11 @@
|
|||
FROM pihole/pihole:2022.02.1
|
||||
FROM pihole/pihole:2022.04.2
|
||||
RUN apt update && apt install -y unbound
|
||||
|
||||
COPY lighttpd-external.conf /etc/lighttpd/external.conf
|
||||
COPY unbound-pihole.conf /etc/unbound/unbound.conf.d/pi-hole.conf
|
||||
COPY 99-edns.conf /etc/dnsmasq.d/99-edns.conf
|
||||
COPY start_unbound_and_s6_init.sh start_unbound_and_s6_init.sh
|
||||
RUN mkdir /etc/services.d/unbound
|
||||
COPY unbound-run /etc/services.d/unbound/run
|
||||
|
||||
ENTRYPOINT ./s6-init
|
||||
|
||||
RUN chmod +x start_unbound_and_s6_init.sh
|
||||
ENTRYPOINT ./start_unbound_and_s6_init.sh
|
||||
|
|
|
@ -1 +1 @@
|
|||
2022.02.1
|
||||
2022.04.2
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
/etc/init.d/unbound start
|
||||
/s6-init
|
25
one-container/pihole-unbound/unbound-run
Normal file
25
one-container/pihole-unbound/unbound-run
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
s6-echo "Starting unbound"
|
||||
|
||||
NAME="unbound"
|
||||
DESC="DNS server"
|
||||
DAEMON="/usr/sbin/unbound"
|
||||
PIDFILE="/run/unbound.pid"
|
||||
|
||||
HELPER="/usr/lib/unbound/package-helper"
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
# Override this variable by editing or creating /etc/default/unbound.
|
||||
DAEMON_OPTS=""
|
||||
|
||||
if [ -f /etc/default/unbound ]; then
|
||||
. /etc/default/unbound
|
||||
fi
|
||||
|
||||
$HELPER chroot_setup
|
||||
$HELPER root_trust_anchor_update 2>&1 | logger -p daemon.info -t unbound-anchor
|
||||
|
||||
$DAEMON -d $DAEMON_OPTS
|
||||
|
Loading…
Reference in a new issue