summaryrefslogtreecommitdiffstats
path: root/initscript/suse/avahi-dnsconfd.in
blob: e633b8d16cd168bab3a228fb47473966c6c73b2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh
### BEGIN INIT INFO
# Provides:          avahi-dnsconfd
# Required-Start:    $remote_fs avahi
# Default-Start:     3 5
# Default-Stop:
# Short-Description: ZeroConf daemon
# Description:       Avahi, a ZeroConf daemon for mDNS and service registration
### END INIT INFO

AVAHI_BIN=@sbindir@/avahi-dnsconfd
test -x $AVAHI_BIN || exit 5

. /etc/rc.status
rc_reset

case "$1" in
	start)
		echo -n "Starting Avahi DNS Configuration daemon "
		$AVAHI_BIN -D
		rc_status -v
		;;
	stop)
		echo -n "Shutting down Avahi DNS Configuration daemon "
		$AVAHI_BIN -k 2>/dev/null || /bin/true
		rc_status -v
		;;
	restart)
		$0 stop
		$0 start
		rc_status
		;;
	force-reload|reload)
		echo -n "Reloading Avahi DNS Configuration daemon "
		$AVAHI_BIN -r
		rc_status -v
		;;
	status)
		echo -n "Checking for Avahi DNS Configuration daemon: "
		$AVAHI_BIN -c
		rc_status -v
		;;
	*)
		echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
		exit 1
		;;
esac