mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-11 18:21:47 +00:00
38 lines
628 B
Plaintext
Executable File
38 lines
628 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
description="mDNS server"
|
|
|
|
depend()
|
|
{
|
|
need 9pinit net
|
|
after firewall
|
|
}
|
|
|
|
start()
|
|
{
|
|
ebegin "Starting mDNS server"
|
|
|
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/mdnstool.pid
|
|
|
|
export HOSTNAME=$(hostname -s).local.
|
|
|
|
start-stop-daemon --start --quiet \
|
|
--background \
|
|
--exec /sbin/mdnstool \
|
|
--make-pidfile --pidfile ${PIDFILE} \
|
|
-- if eth0 -hostname ${HOSTNAME}
|
|
|
|
eend $? "Failed to start mDNS server"
|
|
}
|
|
|
|
stop()
|
|
{
|
|
ebegin "Stopping mDNS server"
|
|
|
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/mdnstool.pid
|
|
|
|
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
|
|
|
|
eend $? "Failed to stop mDNS server"
|
|
}
|