Upstart job for BIND9

Alexander Gurvitz alex at net-me.net
Thu Nov 29 10:25:00 UTC 2012


Hello.

I'm trying to run a bind9 from an upstart job instead of an init.d script.
I'm a bit confused if I should "expect fork" or "expect daemon". It seems
to work with "expect fork", though somehow I don't feel convinced.

(Upstart must know how the daemon forks - if it forks once,
"expect fork" should be specified, and if a daemon forks twice,
it should be "expect daemon". Then upstart will wait for that forkings and
will monitor the final PID).

Thanks in advance,
Alexander Gurvitz,
net-me.net

P.S My /etc/init/bind.conf:

start on runlevel [2345]
stop on runlevel [!2345]

pre-start script
        # dirs under /var/run can go away on reboots.
        mkdir -p /var/run/named
        chmod 775 /var/run/named
        chown root:bind /var/run/named >/dev/null 2>&1 || true
end script

exec /usr/sbin/named -u bind

pre-stop exec rndc stop -p

post-stop exec logger -p user.warning -t upstart-bind "bind stopped"

expect fork
respawn
respawn limit 3 10
kill timeout 30
console none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20121129/d58f9a4e/attachment.html>


More information about the bind-users mailing list