2007-08-11 18:44:54 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Starts mDNSResponderPosix and mdnsd
|
|
|
|
#
|
|
|
|
|
|
|
|
umask 077
|
|
|
|
|
|
|
|
start() {
|
|
|
|
echo -n "Starting mdnsd: "
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -S -q -p /var/run/mdnsd.pid \
|
|
|
|
-x /usr/sbin/mdnsd
|
2007-08-11 18:44:54 +02:00
|
|
|
if [ "$?" != "0" ] ; then
|
|
|
|
echo "FAIL"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
echo "OK"
|
|
|
|
|
|
|
|
echo -n "Starting mDNSResponderPosix: "
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -S -q -p /var/run/mDNSResponderPosix.pid \
|
|
|
|
-x /usr/sbin/mDNSResponderPosix \
|
2007-08-11 18:44:54 +02:00
|
|
|
-- -b -f /etc/mDNSResponderPosix.conf -P /var/run/mDNSResponderPosix.pid
|
|
|
|
if [ "$?" != "0" ] ; then
|
|
|
|
echo "FAIL"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
stop() {
|
|
|
|
echo -n "Stopping mDNSResponderPosix: "
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -K -q -p /var/run/mDNSResponderPosix.pid
|
2007-08-11 18:44:54 +02:00
|
|
|
if [ "$?" != "0" ] ; then
|
|
|
|
echo "FAIL"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
echo "OK"
|
|
|
|
|
|
|
|
echo -n "Stopping mdnsd: "
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -K -q -p /var/run/mdnsd.pid
|
2007-08-11 18:44:54 +02:00
|
|
|
if [ "$?" != "0" ] ; then
|
|
|
|
echo "FAIL"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
|
|
|
|
restart() {
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
restart
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|
|
|
|
|