Files
knot-dns/start.sh
Wolfgang Hottgenroth d7f571f592
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix dockerfile 20
2025-10-24 21:32:28 +02:00

28 lines
693 B
Bash

#!/bin/bash
set -e
echo "Starting Knot DNS initialization..."
# Create necessary directories
mkdir -p /etc/knot /var/lib/knot/keys
# 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