aboutsummaryrefslogtreecommitdiff
path: root/net/beacon/files/beacon.in
blob: 321a6240e05f73b59568ee12330ed8d39e602a33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: beacon
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable beacon.
#
# beacon_enable="YES"

beacon_enable=${beacon_enable-"NO"}

. /etc/rc.subr

name="beacon"
rcvar=`set_rcvar`

command="%%PREFIX%%/bin/${name}"

conffile=%%PREFIX%%/etc/beacon.conf
if [ -f $conffile ]; then
        piddir=`grep OUTPUTDIR $conffile | awk '{print $3}'`
fi
pidfile=${piddir}/multicastbeacon.PID

load_rc_config $name

run_rc_command "$1"