Current section
Files
Jump to
Current section
Files
priv/mdns-wrapper
#!/bin/sh
#
# A little trick to shut down mdnsd when a port is closed.
#
MDNSD_PID=
kill_mdnsd () {
test -z "$MDNSD_PID" || kill -15 "$MDNSD_PID"
exit 0
}
trap kill_mdnsd PIPE INT TERM CHLD EXIT
sbin/mdnsd -debug &
MDNSD_PID=$!
# Read line from this process. If we terminate, we will shut down our child
# process with a little force.
read LINE