3 # avahi-dnsconfd: Starts the Avahi DNS Configuration Daemon
6 # description: avahi-dnsconfd connects to a running avahi-daemon and \
7 # runs the script /etc/avahi/dnsconf.action for each \
8 # unicast DNS server that is announced on the local \
9 # LAN. This is useful for configuring unicast DNS servers \
10 # in a DHCP-like fashion with mDNS.
11 # processname: avahi-dnsconfd
12 # pidfile: @localstatedir@/run/avahi-dnsconfd.pid
15 # Required-Start: avahi-daemon
16 # Required-Stop: avahi-daemon
17 # Should-Start: $syslog $network $local_fs
18 # Should-Stop: $syslog $local_fs
19 # Default-Start: 3 4 5
20 # Default-Stop: 0 1 2 6
21 # Short-Description: Starts the Avahi DNS Configuration Daemon
22 # Description: avahi-dnsconfd connects to a running avahi-daemon
23 # and runs the script /etc/avahi/dnsconf.action for
24 # each unicast DNS server that is announced on the
25 # local LAN. This is useful for configuring unicast
26 # DNS servers in a DHCP-like fashion with mDNS.
29 AVAHI_BIN=@sbindir@/avahi-dnsconfd
32 if [ "$1" = 'status' ]; then
33 test -x $AVAHI_BIN || exit 4
35 test -x $AVAHI_BIN || exit 5
38 # Source function library.
39 . /etc/init.d/functions
40 . /etc/sysconfig/network
42 LOCKFILE=@localstatedir@/lock/subsys/avahi-dnsconfd
43 PIDFILE=@localstatedir@/run/avahi-dnsconfd.pid
49 # Check that networking is configured.
50 [ ${NETWORKING} = "no" ] && exit 1
52 echo -n $"Starting Avahi DNS daemon... "
53 daemon --pidfile=${PIDFILE} $AVAHI_BIN $AVAHI_OPTS
56 [ $RETVAL -eq 0 ] && touch ${LOCKFILE}
61 echo -n $"Shutting down Avahi DNS daemon: "
62 killproc -p ${PIDFILE} $AVAHI_BIN
64 [ $RETVAL -eq 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
70 echo -n $"Reloading Avahi DNS daemon... "
71 killproc -p ${PIDFILE} $AVAHI_BIN -HUP
84 # See how we were called.
93 status -p ${PIDFILE} $AVAHI_BIN
103 if [ -f $LOCKFILE ]; then
108 echo $"Usage: $0 {start|stop|status|restart|condrestart}"