summaryrefslogtreecommitdiff
path: root/recipes/bonjour/files/bonjour.init
blob: 1413ca6c12bd7f5a05a192cb318a9ce211183947 (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
48
#!/bin/sh
#
# A startup script for the Rendezvous mDNS Responder
#

set -e

RDV_CONF=/etc/bonjour.conf
prog=bonjour
exe=/usr/sbin/mdnsd

start() {
        echo -n "Starting $prog: "
        start-stop-daemon --start -x $exe -- -f $RDV_CONF -b
	echo
}

stop() {
        echo -n "Stopping $prog: "
	start-stop-daemon --stop -x $exe
        echo
}

reload()
{
        echo -n "Reloading $prog:"
	killall -HUP `basename $exe`
        echo
}

case "$1" in
start)
        start
        ;;
stop)
        stop
        ;;
reload)
        reload
        ;;
restart)
        stop
        start
        ;;
*)
        echo "Usage: bonjour {start|stop|reload|restart}"
        exit 1
esac