Added service file and package generation

This commit is contained in:
df
2020-07-28 00:28:33 +01:00
parent cfdf09a1dc
commit 7223f118a7
5 changed files with 59 additions and 1 deletions

32
etc/init.d/S80mdnsd Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
case "$1" in
start)
# Wait for network to come up...
(
while [ ! -f /tmp/if-up ]; do
echo "mdnsd: waiting for network..."
sleep 1
done
interface="`/sbin/route | /bin/sed -n '$ {
s/.* //
p
}'`"
echo " MDNS interface: [$interface]"
[ -z "$interface" ] && interface=eth0
/bin/ip route add 224.0.0.0/4 dev $interface
/mod/sbin/mdnsd &
) &
;;
stop)
killall -q mdnsd
;;
*)
exit 1
;;
esac
exit 0