#!/bin/sh

# PROVIDE: mdns_bridge
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# mdns_bridge_enable (bool):	Set to NO by default.
#				Set it to YES to enable mdns-bridge.
# mdns_bridge_config (path):	Set to /usr/local/etc/mdns-bridge.conf
#				by default.

. /etc/rc.subr

name=mdns_bridge
rcvar=mdns_bridge_enable

load_rc_config $name

: ${mdns_bridge_enable:=NO}
: ${mdns_bridge_config=/usr/local/etc/mdns-bridge.conf}

command=/usr/local/bin/mdns-bridge
pidfile=/var/run/${name}.pid

command_args="-s -p $pidfile -c $mdns_bridge_config"

run_rc_command "$1"
