#!/bin/sh ######################################################################## # Begin avahi # # Description : Avahi Boot Script # # Authors : William Immendorf - will.immendorf@gmail.com # Bruce Dubbs - bdubbs@linuxfromscratch.org # # Version : BLFS 7.2 # ######################################################################## ### BEGIN INIT INFO # Provides: avahi # Required-Start: $local_fs $network # Should-Start: networkmanager wicd # Required-Stop: $network # Should-Stop: networkmanager wicd # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Service discovery on a local network # Description: Service discovery on a local network # X-LFS-Provided-By: BLFS ### END INIT INFO . /lib/lsb/init-functions case "${1}" in start) log_info_msg "Starting the Avahi Daemon" start_daemon /usr/sbin/avahi-daemon -D evaluate_retval log_info_msg "Starting the Avahi mDNS/DNS-SD Configuration Daemon" start_daemon /usr/sbin/avahi-dnsconfd -D evaluate_retval ;; stop) log_info_msg "Stopping the Avahi mDNS/DNS-SD Configuration Daemon" if pidofproc avahi-dnsconfd >/dev/null; then /usr/sbin/avahi-dnsconfd -k fi evaluate_retval log_info_msg "Stopping the Avahi Daemon" if pidofproc avahi-daemon >/dev/null; then /usr/sbin/avahi-daemon -k fi evaluate_retval ;; reload) log_info_msg "Reloading the Avahi mDNS/DNS-SD Configuration Daemon" /usr/sbin/avahi-dnsconfd -r evaluate_retval log_info_msg "Reloading the Avahi Daemon" /usr/sbin/avahi-daemon -r evaluate_retval ;; restart) ${0} stop sleep 1 ${0} start ;; status) statusproc avahi-daemon statusproc avahi-dnsconfd ;; *) echo "Usage: ${0} {start|stop|reload|restart|status}" exit 1 ;; esac # End /etc/init.d/avahi