3 # avahi-daemon: Starts the Avahi Daemon
6 # description: This is a daemon which runs on client machines to perform \
7 # Zeroconf service discovery on a network. avahi-daemon must be \
8 # running on systems that use Avahi for service discovery. \
9 # Avahi-daemon should not be running otherwise.
10 # processname: avahi-daemon
15 # Source function library.
16 . /etc/init.d/functions
17 . /etc/sysconfig/network
20 AVAHI_BIN=@sbindir@/avahi-daemon
22 if [ $1 == 'status' ]; then
23 test -x $AVAHI_BIN || exit 4
25 test -x $AVAHI_BIN || exit 5
28 LOCKFILE=/var/lock/subsys/avahi-daemon
33 # Check that networking is configured.
34 [ ${NETWORKING} = "no" ] && exit 1
36 echo -n $"Starting Avahi daemon... "
37 if [ -s /etc/localtime ]; then
38 cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1
42 if [ $RETVAL = 0 ]; then
44 success $"$base startup"
46 failure $"$base startup"
53 echo -n $"Shutting down Avahi daemon: "
56 [ $RETVAL = 0 ] && success $"$base shutdown" || failure $"$base shutdown"
63 echo -n $"Reloading Avahi daemon... "
66 [ $RETVAL = 0 ] && success $"$base reload" || failure $"$base reload"
78 # See how we were called.
89 [ $RETVAL = 0 ] && echo $"Avahi daemon is running" || echo $"Avahi daemon is not running"
98 if [ -f $LOCKFILE ]; then
103 echo $"Usage: $0 {start|stop|status|restart|condrestart}"