]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSPosix/mdnsd.sh
2 # Emacs settings: -*- tab-width: 4 -*-
4 # Copyright (c) 2002-2006 Apple Computer, Inc. All rights reserved.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Linux /etc/init.d script to start/stop the mdnsd daemon.
20 # The following lines are used by the *BSD rcorder system to decide
21 # the order it's going to run the rc.d scripts at startup time.
25 if [ -r /usr
/sbin
/mdnsd
]; then
26 DAEMON
=/usr
/sbin
/mdnsd
28 DAEMON
=/usr
/local
/sbin
/mdnsd
31 test -r $DAEMON || exit 0
33 # Some systems have start-stop-daemon, some don't.
34 if [ -r /sbin
/start
-stop-daemon ]; then
35 START
="start-stop-daemon --start --quiet --exec"
36 # Suse Linux doesn't work with symbolic signal names, but we really don't need
37 # to specify "-s TERM" since SIGTERM (15) is the default stop signal anway
38 # STOP="start-stop-daemon --stop -s TERM --quiet --oknodo --exec"
39 STOP
="start-stop-daemon --stop --quiet --oknodo --exec"
42 kill -TERM `cat /var/run/mdnsd.pid`
50 echo -n "Starting Apple Darwin Multicast DNS / DNS Service Discovery daemon:"
56 echo -n "Stopping Apple Darwin Multicast DNS / DNS Service Discovery daemon:"
57 echo -n " mdnsd" ; $STOP $DAEMON
60 reload
|restart
|force
-reload)
61 echo -n "Restarting Apple Darwin Multicast DNS / DNS Service Discovery daemon:"
68 echo "Usage: /etc/init.d/mDNS {start|stop|reload|restart}"