]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSPosix/mdnsd.sh
3 # Linux /etc/init.d script to start/stop the mdnsd daemon.
4 # Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
6 # @APPLE_LICENSE_HEADER_START@
8 # This file contains Original Code and/or Modifications of Original Code
9 # as defined in and that are subject to the Apple Public Source License
10 # Version 2.0 (the 'License'). You may not use this file except in
11 # compliance with the License. Please obtain a copy of the License at
12 # http://www.opensource.apple.com/apsl/ and read it before using this
15 # The Original Code and all software distributed under the License are
16 # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 # Please see the License for the specific language governing rights and
21 # limitations under the License.
23 # @APPLE_LICENSE_HEADER_END@
26 # Revision 1.6 2004/12/07 20:30:45 cheshire
27 # Fix start-stop-daemon for Suse Linux (don't use -s TERM)
29 # Revision 1.5 2004/06/29 22:13:45 cheshire
30 # Fix from Andrew White at NICTA
32 # Revision 1.4 2004/02/05 20:23:10 cheshire
33 # Fix mdnsd.sh to work on *BSD distributions
35 # Revision 1.3 2004/01/19 22:47:17 cheshire
36 # Define killprocterm() to do "killproc $1 -TERM" for Linux
38 # Revision 1.2 2003/12/11 19:42:13 cheshire
39 # Change name "mDNSResponderd" to "mdnsd" for consistency with standard Linux (Unix) naming conventions
41 # Revision 1.1 2003/12/08 20:47:02 rpantos
42 # Add support for mDNSResponder on Linux.
44 # The following lines are used by the *BSD rcorder system to decide
45 # the order it's going to run the rc.d scripts at startup time.
49 if [ -r /usr
/sbin
/mdnsd
]; then
50 DAEMON
=/usr
/sbin
/mdnsd
52 DAEMON
=/usr
/local
/sbin
/mdnsd
55 test -r $DAEMON || exit 0
57 # Some systems have start-stop-daemon, some don't.
58 if [ -r /sbin
/start
-stop-daemon ]; then
59 START
="start-stop-daemon --start --quiet --exec"
60 # Suse Linux doesn't work with symbolic signal names, but we really don't need
61 # to specify "-s TERM" since SIGTERM (15) is the default stop signal anway
62 # STOP="start-stop-daemon --stop -s TERM --quiet --oknodo --exec"
63 STOP
="start-stop-daemon --stop --quiet --oknodo --exec"
66 kill -TERM `cat /var/run/mdnsd.pid`
74 echo -n "Starting Apple Darwin Multicast DNS / DNS Service Discovery daemon:"
80 echo -n "Stopping Apple Darwin Multicast DNS / DNS Service Discovery daemon:"
81 echo -n " mdnsd" ; $STOP $DAEMON
84 reload
|restart
|force
-reload)
85 echo -n "Restarting Apple Darwin Multicast DNS / DNS Service Discovery daemon:"
92 echo "Usage: /etc/init.d/mDNS {start|stop|reload|restart}"