mirror of
https://github.com/dnscrypt/dnscrypt-server-docker
synced 2024-11-22 11:21:58 +01:00
Ubuntu 21.04 changed /etc/service to /etc/runit/runsvdir/svmanaged
This commit is contained in:
parent
ca2efdc731
commit
22808f0601
17
Dockerfile
17
Dockerfile
@ -1,7 +1,7 @@
|
||||
FROM ubuntu:20.10
|
||||
FROM ubuntu:21.04
|
||||
LABEL maintainer="Frank Denis"
|
||||
SHELL ["/bin/sh", "-x", "-c"]
|
||||
ENV SERIAL 2
|
||||
ENV SERIAL 3
|
||||
|
||||
ENV CFLAGS=-Ofast
|
||||
ENV BUILD_DEPS curl make build-essential git libevent-dev libexpat1-dev autoconf file libssl-dev byacc
|
||||
@ -57,20 +57,21 @@ RUN groupadd _encrypted-dns && \
|
||||
chown _encrypted-dns:_encrypted-dns /opt/dnscrypt-wrapper/etc/keys
|
||||
|
||||
RUN mkdir -p \
|
||||
/etc/service/unbound \
|
||||
/etc/service/watchdog
|
||||
/var/svc/unbound \
|
||||
/var/svc/encrypted-dns \
|
||||
/var/svc/watchdog
|
||||
|
||||
COPY encrypted-dns.toml.in /opt/encrypted-dns/etc/
|
||||
COPY undelegated.txt /opt/encrypted-dns/etc/
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
COPY unbound.sh /etc/service/unbound/run
|
||||
COPY unbound-check.sh /etc/service/unbound/check
|
||||
COPY unbound.sh /var/svc/unbound/run
|
||||
COPY unbound-check.sh /var/svc/unbound/check
|
||||
|
||||
COPY encrypted-dns.sh /etc/service/encrypted-dns/run
|
||||
COPY encrypted-dns.sh /var/svc/encrypted-dns/run
|
||||
|
||||
COPY watchdog.sh /etc/service/watchdog/run
|
||||
COPY watchdog.sh /var/svc/watchdog/run
|
||||
|
||||
VOLUME ["/opt/encrypted-dns/etc/keys"]
|
||||
|
||||
|
@ -13,6 +13,7 @@ LISTS_DIR="/opt/encrypted-dns/etc/lists"
|
||||
CONF_DIR="/opt/encrypted-dns/etc"
|
||||
CONFIG_FILE="${CONF_DIR}/encrypted-dns.toml"
|
||||
CONFIG_FILE_TEMPLATE="${CONF_DIR}/encrypted-dns.toml.in"
|
||||
SERVICES_DIR="/etc/runit/runsvdir/svmanaged"
|
||||
|
||||
init() {
|
||||
if [ "$(is_initialized)" = yes ]; then
|
||||
@ -172,6 +173,11 @@ start() {
|
||||
/opt/encrypted-dns/sbin/encrypted-dns \
|
||||
--config "$CONFIG_FILE" --dry-run |
|
||||
tee "${KEYS_DIR}/provider-info.txt"
|
||||
|
||||
find /var/svc -mindepth 1 -maxdepth 1 -type d | while read -r service; do
|
||||
ln -s "$service" "${SERVICES_DIR}/"
|
||||
done
|
||||
|
||||
exec /etc/runit/2 </dev/null >/dev/null 2>/dev/null
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user