]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/howl/files/mdnsresponder.init
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / howl / files / mdnsresponder.init
1 #!/bin/sh
2 #
3 # mDNSResponder:       Starts the mDNSResponder Daemon
4 #
5 # This is an init script for Debian by Reed Hedges, based on the skeleton by 
6 # Miguel van Smoorenburg and Ian Murdock, and based on the original mDNSResponder 
7 # script from Howl.
8
9 PATH=/sbin:/bin:/usr/sbin:/usr/bin
10 DAEMON=/usr/sbin/mDNSResponder
11 NAME=mDNSResponder
12 DESC="Zeroconf service discovery responder"
13 PIDFILE=/var/run/${NAME}.pid
14 LOCKFILE=/var/lock/subsys/${NAME}
15 CONFIG=/etc/mdnsresponder/mDNSResponder.conf
16
17 test -x $DAEMON || exit 0
18
19 start() {
20         echo -n $"Starting $DESC: $NAME"
21         start-stop-daemon --start --quiet -u daemon --exec $DAEMON -- -f $CONFIG
22         echo "."
23 }
24
25 stop() {
26         echo -n $"Stopping $DESC: $NAME"
27         start-stop-daemon --stop --quiet --exec $DAEMON
28         test -f $LOCKFILE && rm -f $LOCKFILE
29         test -f $PIDFILE &&  rm -f $PIDFILE
30         echo "."
31 }
32
33 restart() {
34         stop
35     sleep 1
36         start
37 }
38
39
40 # See how we were called.
41 case "$1" in
42   start)
43         start
44         ;;
45   stop)
46         stop
47         ;;
48   restart|force-reload)
49         restart
50         ;;
51   *)
52         echo $"Usage: $0 {start|stop|restart}"
53         exit 1
54 esac
55
56 exit 0