3
# Provides: avahi-dnsconfd
4
# Required-Start: $remote_fs avahi-daemon
5
# Required-Stop: $remote_fs avahi-daemon
6
# Should-Start: $syslog
8
# Default-Start: 2 3 4 5
10
# Short-Description: Avahi Unicast DNS Configuration Daemon
11
# Description: A DNS configuration daemon using mDNS in a
15
PATH=/sbin:/bin:/usr/sbin:/usr/bin
16
DESC="Avahi Unicast DNS Configuration 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
27
# Function that starts the daemon/service.
30
$DAEMON -c && return 0
32
if [ -s /etc/localtime ]; then
33
if [ ! -d /etc/avahi/etc ]; then
34
mkdir -p /etc/avahi/etc >/dev/null 2>&1
36
cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1
43
# Function that stops the daemon/service.
52
# Function that reload the config file for the daemon/service.
55
$DAEMON -c && $DAEMON -r
59
# Function that check the status of the daemon/service.
62
$DAEMON -c && { echo "$DESC is running"; exit 0; } || { echo "$DESC is not running"; exit 3; }
67
log_daemon_msg "Starting $DESC" "$NAME"
72
log_daemon_msg "Stopping $DESC" "$NAME"
77
log_daemon_msg "Refreshing $DESC" "$NAME"
82
log_daemon_msg "Restarting $DESC" "$NAME"
84
if [ "$?" -eq 0 ]; then
95
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|refresh|status}" >&2