#!/bin/sh
#
# $NetBSD: mdnsd.sh,v 1.1 2024/11/20 17:56:20 hauke Exp $
#

# PROVIDE: mdnsd
# REQUIRE: network mountcritlocal staticroute
# BEFORE:  NETWORKING

if [ -f /etc/rc.subr ]
then
    $_rc_subr_loaded . /etc/rc.subr
fi

name="mdnsd"
rcvar=$name
command="/usr/pkg/sbin/$name"
pidfile="/var/run/mdnsd/${name}.pid"
start_precmd="mdnsd_precmd"

mdnsd_precmd()
{
    if [ ! -d /var/run/mdnsd ]; then
        mkdir -p -m 755 /var/run/mdnsd
    fi
    chown _mdnsd:_mdnsd /var/run/mdnsd
}
                                                        
load_rc_config $name
run_rc_command "$1"
