]> git.meshlink.io Git - catta/blob - initscript/suse/avahi-dnsconfd.in
add suse init scripts
[catta] / initscript / suse / avahi-dnsconfd.in
1 #! /bin/sh
2 ### BEGIN INIT INFO
3 # Provides:       avahi-dnsconfd
4 # Required-Start: avahi
5 # Default-Start:  3 5
6 # Default-Stop:
7 # Description: Avahi, a ZeroConf daemon for mDNS and service registration
8 ### END INIT INFO
9
10 AVAHI_BIN=@sbindir@/avahi-dnsconfd
11 test -x $AVAHI_BIN || exit 5
12
13 . /etc/rc.status
14 rc_reset
15
16 case "$1" in
17     start)
18         echo -n "Starting Avahi DNS Configuration daemon"
19         /sbin/startproc $AVAHI_BIN -D
20         rc_status -v
21         ;;
22     stop)
23         echo -n "Shutting down Avahi DNS Configuration daemon"
24         $AVAHI_BIN -k || /bin/true
25         rc_status -v
26         ;;
27     restart)
28         $0 stop
29         $0 start
30         rc_status
31         ;;
32     force-reload|reload)
33         echo -n "Reloading Avahi DNS Configuration daemon"
34         $AVAHI_BIN -r
35         rc_status -v
36         ;;
37     status)
38         echo -n "Checking for Avahi DNS Configuration daemon: "
39         $AVAHI_BIN -c
40         rc_status -v
41         ;;
42     *)
43         echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
44         exit 1
45         ;;
46 esac
47