Files
bind/start.sh
Wolfgang Hottgenroth 92ddbcdf4d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
transfer key to secret
2025-10-27 13:52:11 +01:00

20 lines
591 B
Bash
Executable File

#!/bin/bash
set -ex
echo "Starting BIND initialization..."
INITIALLY_INSTALLED_FLAG="/etc/named/zones/initialized"
# Copy template files to working directories if they don't exist
if [ ! -f $INITIALLY_INSTALLED_FLAG ]; then
echo "Initialized ..."
touch $INITIALLY_INSTALLED_FLAG
cp /etc/named-dist/zones.conf /etc/named/zones/zones.conf
cp /etc/named-dist/whiskeylimahotel.de.zone /etc/named/zones/whiskeylimahotel.de.zone
else
echo "Already initialized, skipping initial setup."
fi
echo "Starting BIND server..."
exec /usr/sbin/named -f -g -c /etc/named/named.conf