4 # Required-Start: $remote_fs dbus
5 # Required-Stop: $remote_fs dbus
6 # Should-Start: $syslog
8 # Default-Start: 2 3 4 5
10 # Short-Description: Avahi mDNS/DNS-SD Daemon
11 # Description: Zeroconf daemon for configuring your network
15 PATH=/sbin:/bin:/usr/sbin:/usr/bin
16 DESC="Avahi mDNS/DNS-SD Daemon"
18 DAEMON="/usr/sbin/$NAME"
19 SCRIPTNAME=/etc/init.d/$NAME
21 # Gracefully exit if the package has been removed.
22 test -x $DAEMON || exit 0
24 . /lib/lsb/init-functions
26 # Include avahi-daemon defaults if available.
27 test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon
29 DISABLE_TAG="/var/run/avahi-daemon/disabled-for-unicast-local"
32 # Function that starts the daemon/service.
35 $DAEMON -c && return 0
37 if [ -e $DISABLE_TAG -a "$AVAHI_DAEMON_DETECT_LOCAL" != "0" ]; then
38 # Disabled because of the existance of an unicast .local domain
39 log_warning_msg "avahi-daemon disabled because there is a unicast .local domain"
47 # Function that stops the daemon/service.
56 # Function that reload the config file for the daemon/service.
59 $DAEMON -c && $DAEMON -r
63 # Function that check the status of the daemon/service.
66 $DAEMON -c && echo "$DESC is running" || echo "$DESC is not running"
71 log_daemon_msg "Starting $DESC" "$NAME"
76 log_daemon_msg "Stopping $DESC" "$NAME"
81 log_daemon_msg "Reloading services for $DESC" "$NAME"
86 log_daemon_msg "Restarting $DESC" "$NAME"
95 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload}" >&2