#!/bin/sh set -e # RFC5011 root trust anchor: persistent across restarts. # Initialize from the dnssec-root package ONLY if no state file exists yet; # afterwards unbound maintains the file itself (learned keys, rollover # state). /var/unbound is a named volume in the compose template (writable # by uid 1500). mkdir -p /var/unbound if [ ! -f /var/unbound/root.key ]; then cp -f /usr/share/dnssec-root/trusted-key.key /var/unbound/root.key fi # Fail fast on broken drop-in configs from /config before starting. unbound-checkconf /etc/unbound/unbound.conf exec unbound -d -c /etc/unbound/unbound.conf