3 # avahi-daemon: Starts the Avahi mDNS/DNS-SD Stack
6 # description: This is a daemon which runs on client machines to \
7 # perform Zeroconf service discovery on a \
8 # network. avahi-daemon must be running on systems that \
9 # use Avahi for service discovery. Avahi-daemon should \
10 # not be running otherwise.
11 # processname: avahi-daemon
12 # pidfile: @localstatedir@/run/avahi-daemon/pid
15 # Required-Start: messagebus
16 # Required-Stopt: messagebus
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 Daemon
22 # Description: This is a daemon which runs on client machines to
23 # perform Zeroconf service discovery on a
24 # network. avahi-daemon must be running on systems
25 # that use Avahi for service discovery.
26 # Avahi-daemon should not be running otherwise.
29 AVAHI_BIN=@sbindir@/avahi-daemon
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-daemon
43 PIDFILE=@localstatedir@/run/avahi-daemon/pid
49 # Check that networking is configured.
50 [ ${NETWORKING} = "no" ] && exit 1
52 echo -n $"Starting Avahi daemon... "
53 if [ -s /etc/localtime ]; then
54 cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1
56 daemon --pidfile=${PIDFILE} $AVAHI_BIN $AVAHI_OPTS
59 [ $RETVAL -eq 0 ] && touch ${LOCKFILE}
64 echo -n $"Shutting down Avahi daemon: "
65 killproc -p ${PIDFILE} $AVAHI_BIN
67 [ $RETVAL -eq 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
73 echo -n $"Reloading Avahi daemon... "
74 killproc -p ${PIDFILE} $AVAHI_BIN -HUP
87 # See how we were called.
96 status -p ${PIDFILE} $AVAHI_BIN
106 if [ -f $LOCKFILE ]; then
111 echo $"Usage: $0 {start|stop|status|restart|condrestart}"