This commit is contained in:
2025-10-26 21:52:06 +01:00
parent 1671cff9ae
commit b3cf0bafec
3 changed files with 81 additions and 0 deletions

26
start.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -ex
echo "Starting BIND initialization..."
mkdir -p /etc/named
# Copy template files to working directories if they don't exist
if [ ! -f /etc/knot/knot.conf ]; then
echo "Copying knot.conf from template..."
cp /etc/knot-dist/knot.conf /etc/knot/
echo "Copying zone file from template..."
cp /var/lib/knot-dist/my-dnssec-test-domain.de.zone /var/lib/knot/
fi
# Ensure proper ownership
echo "Setting file ownership..."
chown -R knot:knot /etc/knot /var/lib/knot
# Check configuration
echo "Validating configuration..."
/usr/sbin/knotc conf-check
echo "Starting Knot DNS server..."
exec /usr/sbin/knotd