mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-17 00:31:37 +00:00
37 lines
656 B
Plaintext
Executable File
37 lines
656 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
|
|
|
|
HOSTNAME=$(hostname -s).local.
|
|
|
|
# start-stop-daemon --start --quiet \
|
|
# --exec /sbin/mdnstool \
|
|
# --pidfile "${PIDFILE}" \
|
|
# -- if eth0 -hostname ${HOSTNAME}
|
|
# eend $? "Failed to start mDNS server"
|
|
/sbin/mdnstool if eth0 -hostname ${HOSTNAME} -detach &
|
|
}
|
|
|
|
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"
|
|
}
|