From 1e89e2b903b578ec013df837af04fc8facc939cd Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Tue, 25 Feb 2025 21:51:26 -0800 Subject: feat: add unbound container --- src/unbound/bin/entrypoint.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 src/unbound/bin/entrypoint.sh (limited to 'src/unbound/bin/entrypoint.sh') diff --git a/src/unbound/bin/entrypoint.sh b/src/unbound/bin/entrypoint.sh new file mode 100755 index 0000000..d1b4b3a --- /dev/null +++ b/src/unbound/bin/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -e + +log() { + echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" +} + +# Setup chroot environment +log "Setting up chroot environment..." +if /usr/lib/unbound/package-helper chroot_setup; then + log "Chroot setup completed successfully" +else + log "ERROR: Chroot setup failed" + exit 1 +fi + +# Update root trust anchor +log "Updating root trust anchor..." +if /usr/lib/unbound/package-helper root_trust_anchor_update; then + log "Root trust anchor updated successfully" +else + log "ERROR: Root trust anchor update failed" + exit 1 +fi + +# Start unbound in debug mode +log "Starting unbound daemon..." +exec /usr/sbin/unbound -d -p $DOPTS -- cgit v1.2.3