aboutsummaryrefslogtreecommitdiff
path: root/src/unbound/bin/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/unbound/bin/entrypoint.sh')
-rwxr-xr-xsrc/unbound/bin/entrypoint.sh28
1 files changed, 28 insertions, 0 deletions
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