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
13 AVAHI_BIN=@sbindir@/avahi-daemon
15 if [ "$1" = 'status' ]; then
16 test -x $AVAHI_BIN || exit 4
18 test -x $AVAHI_BIN || exit 5
23 # Source function library.
24 . /etc/init.d/functions
25 . /etc/sysconfig/network
27 LOCKFILE=/var/lock/subsys/avahi-daemon
32 # Check that networking is configured.
33 [ ${NETWORKING} = "no" ] && exit 1
35 echo -n $"Starting Avahi daemon... "
36 if [ -s /etc/localtime ]; then
37 cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1
41 if [ $RETVAL = 0 ]; then
43 success $"$base startup"
45 failure $"$base startup"
52 echo -n $"Shutting down Avahi daemon: "
55 [ $RETVAL = 0 ] && success $"$base shutdown" || failure $"$base shutdown"
62 echo -n $"Reloading Avahi daemon... "
65 [ $RETVAL = 0 ] && success $"$base reload" || failure $"$base reload"
77 # See how we were called.
88 [ $RETVAL = 0 ] && echo $"Avahi daemon is running" || echo $"Avahi daemon is not running"
97 if [ -f $LOCKFILE ]; then
102 echo $"Usage: $0 {start|stop|status|restart|condrestart}"