1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-29 04:17:07 +00:00
mailinabox/containers/docker/runit/nsd.sh
2015-02-25 22:25:03 +01:00

16 lines
344 B
Bash

#!/bin/bash
NAME=nsd
DAEMON=/usr/sbin/$NAME
CONFFILE=/etc/nsd/nsd.conf
DAEMON_ARGS="-d -c $CONFFILE"
# reconfigure since the ip may have changed
# if it fails runit will retry anyway, but
# don't do this on first start
if [ -f /var/lib/mailinabox/api.key ]; then
/usr/local/mailinabox/tools/dns_update
fi
exec $DAEMON $DAEMON_ARGS 2>&1