[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: need djb dnscache init script



On Mon, Aug 18, 2003 at 10:02:03PM -0400, Tom Vier wrote:
> i've googgled a bunch, but all i've come up w/ are redhat scripts. anyone
> happen to have a debian version?

Install daemontools and run djbdns using svscan as you should.  Here's
Adam McKenna's [0] init.d script to start/stop svcsan [1]:

---%<---
#!/bin/sh -e
# /etc/init.d/svscan : start or stop svscan.

PATH="/usr/local/bin:$PATH"

case "$1" in
  start)
    echo -n "Starting djb services: svscan "
    env - PATH="/usr/local/bin:$PATH" svscan /service &
    echo $! > /var/run/svscan.pid
    echo "."
    ;;
  stop)
    echo -n "Stopping djb services: svscan "
    kill `cat /var/run/svscan.pid`
    echo -n "services "
    svc -dx /service/*
    echo -n " logging "
    svc -dx /service/*/log
    echo "."
    ;;
  restart|reload|force-reload)
    $0 stop
    $0 start
    ;;
  *)
    echo 'Usage: /etc/init.d/svscan {start|stop|restart}'
    exit 1
esac

exit 0
---%<---

[0] At least, it's a modified version of his script found on his qmail
page, http://www.flounder.net/qmail/qmail-howto.html (the script
doesn't seem to be there today).

[1] Now daemontools sets up svscan so it runs out of init.  I find
this to be ... gross.

-- 
Nathan Norman - Incanus Networking mailto:nnorman@incanus.net
  A booming voice says, "Wrong, cretin!", and you notice that
  you have turned into a pile of dust.



Reply to: