Provide rc.d script

This commit is contained in:
Emanuel Haupt 2015-04-06 14:13:31 +00:00
parent e2d949a5ed
commit c974dd7c89
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=383426
2 changed files with 29 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= mdns-repeater
PORTVERSION= 1.10
PORTREVISION= 1
CATEGORIES= net dns
MASTER_SITES= LOCAL/ehaupt
@ -11,6 +12,8 @@ COMMENT= Multicast DNS repeater to re-broadcast mDNS packets across interfaces
LICENSE= GPLv2
USE_RC_SUBR= mdns-repeater
CFLAGS+= -DHGVERSION="\"${PORTVERSION}\""
PLIST_FILES= bin/mdns-repeater

View File

@ -0,0 +1,26 @@
#!/bin/sh
#
# PROVIDE: mdns_repeater
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable mdns-repeater
# mdns_repeater_enable="YES"
# mdns_repeater_interfaces="vr0 vr1"
. /etc/rc.subr
name=mdns_repeater
rcvar=mdns_repeater_enable
load_rc_config ${name}
: ${mdns_repeater_enable:=NO}
: ${mdns_repeater_interfaces:="vr0 vr1"}
pidfile="/var/run/mdns-repeater.pid"
command="%%PREFIX%%/bin/mdns-repeater"
command_args=" -p ${pidfile} ${mdns_repeater_interfaces}"
# run service
run_rc_command "$1"