Files
zonemaster.es/zonemaster/test-zone-data/start-coredns.sh
Malin 8d4eaa1489 feat: add full Zonemaster stack with Docker and Spanish UI
- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI)
- Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend
- Dockerfile.gui: Astro static build served via nginx
- docker-compose.yml: backend (internal) + frontend (port 5353)
- nginx.conf: root redirects to /es/, /api/ proxied to backend
- zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 08:19:24 +02:00

56 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -u
usage() { (echo "Usage: sudo $0" 1>&2;
echo
echo "Start CoreDNS for Zonemaster test zone environment"
echo )1>&2;
exit 1;
}
while getopts "h" o; do
case "${o}" in
h)
usage
;;
*)
usage
;;
esac
done
shift $((OPTIND-1))
# Make sure the script is run by root
if [ $(id -u) -ne 0 ] ; then
echo "You must be root." 1>&2
echo "Run 'sudo $0'" 1>&2
exit 1
fi
# Get path to this script
path=$(dirname $0)
# Go to the directory of the script
cd $path || exit 1
# main.cfg must be in the same folder as this script
maincfg="main.cfg"
# Is CoreDNS already running? One instance at a time.
if ps --no-headers -fC coredns | grep coredns ; then
echo "Only one instance of CoreDNS must be run at a time."
echo "Kill old instances or break with CTRL-C."
echo
killall -s 9 -i coredns
sleep 2
fi
if ps --no-headers -fC coredns | grep coredns ; then
echo "Cannot start CoreDNS since it is already running. Exit."
else
coredns --conf ${maincfg}
fi