diff --git a/image/overlay/etc/init.d/tsdns b/image/overlay/etc/init.d/tsdns index 1f211e3..1fc86a8 100755 --- a/image/overlay/etc/init.d/tsdns +++ b/image/overlay/etc/init.d/tsdns @@ -4,5 +4,9 @@ depend() { need docker net } +supervisor="supervise-daemon" +restart_max=0 +restart_delay=10 + command="/usr/bin/tsdns" pidfile="/run/${RC_SVCNAME}.pid" diff --git a/image/overlay/usr/bin/tsdns b/image/overlay/usr/bin/tsdns index be2404b..4d34d56 100755 --- a/image/overlay/usr/bin/tsdns +++ b/image/overlay/usr/bin/tsdns @@ -11,6 +11,10 @@ fi HOSTNAME=$(cat /etc/hostname) +if docker container inspect "tsdns" ; then + exit 0 +fi + docker run -e "TS_AUTHKEY=_TS_AUTHKEY_" \ -e "HOMELAB_TLD=_HOMELAB_TLD_" \ -e "HOMELAB_ZONE=_HOMELAB_ZONE_" \