- 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>
61 lines
1.7 KiB
Bash
61 lines
1.7 KiB
Bash
#!/bin/sh
|
|
#
|
|
### BEGIN INIT INFO
|
|
# Provides: zm-testagent
|
|
# Required-Start: $network $local_fs
|
|
# Required-Stop: $network $local_fs
|
|
# Should-Start: mysql postgresql
|
|
# Should-Stop: mysql postgresql
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: An asynchronous execution backend for Zonemaster Backend
|
|
# Description: zm-testagent checks the Zonemaster Backend database for new
|
|
# tests, executes them and writes back progress and results.
|
|
### END INIT INFO
|
|
|
|
BINDIR=${ZM_BACKEND_BINDIR:-/usr/local/bin}
|
|
LOGFILE=${ZM_BACKEND_LOGFILE:-/var/log/zonemaster/zm-testagent.log}
|
|
OUTFILE=${ZM_BACKEND_OUTFILE:-/var/log/zonemaster/zm-testagent.out}
|
|
PIDFILE=${ZM_BACKEND_PIDFILE:-/var/run/zonemaster/zm-testagent.pid}
|
|
USER=${ZM_BACKEND_USER:-zonemaster}
|
|
GROUP=${ZM_BACKEND_GROUP:-zonemaster}
|
|
|
|
#ZM_BACKEND_TESTAGENT_LOGLEVEL='info' # Set this variable to override the default log level
|
|
|
|
testagent_args="--logfile=$LOGFILE --outfile=$OUTFILE --pidfile=$PIDFILE --user=$USER --group=$GROUP"
|
|
if [ -n "$ZM_BACKEND_TESTAGENT_LOGLEVEL" ] ; then
|
|
testagent_args="$testagent_args --loglevel=$ZM_BACKEND_TESTAGENT_LOGLEVEL"
|
|
fi
|
|
|
|
start () {
|
|
$BINDIR/zonemaster_backend_testagent $testagent_args start || exit 1
|
|
}
|
|
|
|
stop () {
|
|
$BINDIR/zonemaster_backend_testagent $testagent_args stop
|
|
}
|
|
|
|
status () {
|
|
$BINDIR/zonemaster_backend_testagent $testagent_args status
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|force-reload)
|
|
stop
|
|
start
|
|
;;
|
|
status)
|
|
status
|
|
;;
|
|
*)
|
|
echo "usage: $0 [start|stop|restart|status]"
|
|
exit 1
|
|
esac
|
|
exit 0
|