#!/bin/bash ### BEGIN INIT INFO # Provides: avahi-dnsconfd # Required-Start: $network dbus avahi-daemon # Required-Stop: $network dbus avahi-daemon # Default-Start: 3 4 5 # Default-Stop: 0 1 2 6 ### END INIT INFO . /lib/lsb/init-functions case "$1" in start) echo -n "Starting Avahi DNS Configuration daemon..." if start_daemon /usr/sbin/avahi-dnsconfd -D then log_success_msg else log_failure_msg fi ;; stop) echo -n "Stopping Avahi DNS Configuration daemon..." if killproc /usr/sbin/avahi-dnsconfd then log_success_msg "." else log_failure_msg fi ;; restart|force-reload) $0 stop sleep 1 $0 start ;; try-restart) if pidofproc /usr/sbin/avahi-dnsconfd then $0 restart fi ;; status) pidofproc /usr/sbin/avahi-dnsconfd exit $? ;; *) echo "Usage: $0 {start|stop|restart|try-restart|force-reload|status}" exit 1 ;; esac