3 # avahi-dnsconfd: Starts the Avahi dns configuration daemon
6 # description: avahi-dnsconfd connects to a running avahi-daemon and runs the script \
7 # /etc/avahi/dnsconf.action for each unicast DNS server that is announced \
8 # on the local LAN. This is useful for configuring unicast DNS servers in \
9 # a DHCP-like fashion with mDNS.
10 # processname: avahi-dnsconfd
11 # pidfile: @localstatedir@/run/avahi-dnsconfd.pid
13 AVAHI_BIN=@sbindir@/avahi-dnsconfd
16 if [ "$1" = 'status' ]; then
17 test -x $AVAHI_BIN || exit 4
19 test -x $AVAHI_BIN || exit 5
22 # Source function library.
23 . /etc/init.d/functions
24 . /etc/sysconfig/network
26 LOCKFILE=@localstatedir@/lock/subsys/avahi-dnsconfd
27 PIDFILE=@localstatedir@/run/avahi-dnsconfd.pid
33 # Check that networking is configured.
34 [ ${NETWORKING} = "no" ] && exit 1
36 echo -n $"Starting Avahi DNS daemon... "
37 daemon --pidfile=${PIDFILE} $AVAHI_BIN $AVAHI_OPTS
40 [ $RETVAL -eq 0 ] && touch ${LOCKFILE}
45 echo -n $"Shutting down Avahi DNS daemon: "
46 killproc -p ${PIDFILE} $AVAHI_BIN
48 [ $RETVAL -eq 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
54 echo -n $"Reloading Avahi DNS daemon... "
55 killproc -p ${PIDFILE} $AVAHI_BIN -HUP
68 # See how we were called.
77 status -p ${PIDFILE} $AVAHI_BIN
87 if [ -f $LOCKFILE ]; then
92 echo $"Usage: $0 {start|stop|status|restart|condrestart}"