blob: c61f2cd3f84859ae9b3f81167fdd1b2ec2966fce (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/sh
# PROVIDE: radiator
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
# Install this script as %%LOCALBASE%%/etc/rc.d/radiator
# Add the following line to /etc/rc.conf to enable "radiator":
#
#radiator_enable="YES"
#
# And if necessary:
#
#radiator_config="/path/to/radiator.conf"
#(default config location is %%LOCALBASE%%/etc/radiator/radius.cfg)
#
#radiator_flags=""
#
# Start %%LOCALBASE%%/etc/rc.d/radiator to see a list of options.
. /etc/rc.subr
name="radiator"
rcvar=`set_rcvar`
pidfile="/var/run/radiator.pid"
command="%%LOCALBASE%%/bin/radiusd"
procname="%%LOCALBASE%%/bin/perl"
extra_commands="reload"
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
load_rc_config $name
: ${radiator_enable="NO"}
: ${radiator_flags=""}
: ${radiator_config="%%LOCALBASE%%/etc/radiator/radius.cfg"}
required_files="$radiator_config"
command_args="-pid_file=${pidfile} -config_file=$radiator_config -daemon"
run_rc_command "$1"
|