3 # avahi-daemon: Starts the Avahi daemon
7 # description: This is a daemon which runs on client machines to perform \
8 # Zeroconf service discovery on a network. avahi-daemon must be \
9 # running on systems that use Avahi for service discovery. \
10 # Avahi-daemon should not be running otherwise.
13 # Source function library
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
19 # Check that networking is up.
20 if is_yes "${NETWORKING}"; then
21 if [ ! -f /var/lock/subsys/network ]; then
22 msg_network_down avahi-daemon
30 # See how we were called.
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/avahi-daemon ]; then
35 msg_starting avahi-daemon
36 daemon avahi-daemon -D
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/avahi-daemon
40 msg_already_running avahi-daemon
44 if [ -f /var/lock/subsys/avahi-daemon ]; then
46 msg_stopping avahi-daemon
48 rm -f /var/lock/subsys/avahi-daemon
50 msg_not_running avahi-daemon
59 if [ -f /var/lock/subsys/avahi-daemon ]; then
60 msg_reloading avahi-daemon
61 killproc avahi-daemon -HUP
64 msg_not_running avahi-daemon >&2
77 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
83 # This must be last line !
84 # vi:syntax=sh:tw=78:ts=8:sw=4