blob: eed2b264c827c02e3ca9df8edbae0d5f12802109 (
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
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: radiusd
# REQUIRE: %%REQUIRE%%
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable radiusd:
#
# radiusd_enable="YES"
#
. %%RC_SUBR%%
name=radiusd
rcvar=`set_rcvar`
load_rc_config $name
command=%%PREFIX%%/sbin/radiusd
# In debug mode, radiusd doesn't create a pid file, so comment pidfile and
# let rc.subr use a process check on procname (which defaults to command).
#pidfile=/var/run/radiusd/radiusd.pid
extra_commands="reload debug"
debug_cmd="radiusd_debug"
# The radiusd_config parameter is now obsolete. Instead, derive the
# configuration directory name from radiusd_flags if possible, otherwise
# default to %%PREFIX%%/etc/raddb
required_dirs=`echo ${radiusd_flags} | sed -Ee 's:.*\-[^[:space:]d]*d[[:space:]]*([^[:space:]]+).*:\1:'`
required_dirs=${required_dirs:-"%%PREFIX%%/etc/raddb"}
required_files="${required_dirs}/radiusd.conf"
radiusd_enable=${radiusd_enable-"NO"}
radiusd_debug()
{
radiusd_flags="-X ${radiusd_flags}"
run_rc_command start
}
run_rc_command "$1"
|