Mail archive

Re: [alpine-devel] how do I get axfrdns (djbdns) going in Alpine?

From: Timo Teräs <>
Date: Sat, 14 Nov 2009 10:24:21 +0200 wrote:
> Hello alpine-devel's, and thank you for Alpine Linux! I am a longtime
> user of LEAF and its predecessor LRP, so I was excited to find Alpine,
> as I've wanted to get away from floppy disk storage of configs for a
> long time now.
> I have Shorewall configured to my liking, as well as Tinydns, but now I
> want to be able to provide axfr responses to non - djb slave dns
> servers, and I would like to log queries. I have not found any
> documentation on how to do this with Alpine. Any help would be greatly
> appreciated.
> I have added the package djbdns-1.05-r32, which contains axfrdns, but I
> don't know where to go from there. Do I follow the Bernstein
> instructions at , including
> creating 'acct' and 'logacct'? I assume not, since I don't see a
> daemontools package available to give me multilog. I'd be happy to rtfm
> if I could find the fm ;)
> Alternatively, I'll consider using BIND since you have it available....

I have axfrdns running on an Alpine 1.8 based box. It uses tcpserver from
ucspi-tcp package. I attached the init.d script I'm using. Something like
this should be added to djbdns package.

- Timo

# control an instance of axfrdns
# written for alpine linux - NBA May 2009

# -- Statrup variables
UID=$( grep tinydns /etc/passwd | cut -f3 -d: )
GID=$( grep tinydns /etc/group | cut -f3 -d: )

if [ -n "$IFACE" ] && [ "${SVCNAME}" != "tinydns" ]; then

# Main program
start() {

        ebegin "Starting axfrdns"
        if [ -z "$UID" ] || [ -z "$GID" ]; then
                eend 1 "tinydns user or group missing"
                return 1
        # if its already running, just report it is
        if [ -e ${VARRUN}.pid ] && [ -d /proc/$( cat ${VARRUN}.pid ) ]; then
                eend 0
                return 0

        if [ -z "$IP" ]; then
                eend 1 "IP is not specified in /etc/conf.d/$SVCNAME"
                return 1
                export UID GID ROOT AXFR
                echo $SUPERSERVER -HR -l $HOST $IP $PORT $DAEMON
                $SUPERSERVER -HR -l $HOST $IP $PORT $DAEMON >/dev/null 2>/dev/null &
                sleep 1
                # Check if its still running
                if ! [ -d /proc/$pid ]; then
                # rm ${VARRUN}.pid
                # $SUPERSERVER -HR -l $HOST $IP $PORT $DAEMON >/dev/null 2>/dev/null &
                        return 1
                echo $pid > ${VARRUN}.pid
        eend $?
        return 0

stop() {
        ebegin "Stopping axfrdns"
        start-stop-daemon --stop -m --pidfile ${VARRUN}.pid --oknodo \
                --exec $SUPERSERVER && rm ${VARRUN}.pid
        eend $?

Received on Sat Nov 14 2009 - 10:24:21 UTC