diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2004-08-29 02:18:42 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2004-08-29 02:18:42 +0000 |
commit | 874e935564f157101eab282b29cbfc3764434b83 (patch) | |
tree | bfc230082d62c9731517e6417eb9ae02affedafe /net/freeradius/files/radiusd.sh | |
parent | 410bb41c462724bfdeb8f0ef9d188218de8da7ed (diff) | |
download | ports-874e935564f157101eab282b29cbfc3764434b83.tar.gz ports-874e935564f157101eab282b29cbfc3764434b83.zip |
Notes
Diffstat (limited to 'net/freeradius/files/radiusd.sh')
-rw-r--r-- | net/freeradius/files/radiusd.sh | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/net/freeradius/files/radiusd.sh b/net/freeradius/files/radiusd.sh index 798339462cd1..ea3a152bfd47 100644 --- a/net/freeradius/files/radiusd.sh +++ b/net/freeradius/files/radiusd.sh @@ -1,38 +1,27 @@ #!/bin/sh -# RADIUSD_FLAGS='-xxyzsf -l stdout' -RADIUSD_FLAGS= +# PROVIDE radiusd +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD shutdown -if [ -r /etc/defaults/rc.conf ]; then - . /etc/defaults/rc.conf - source_rc_confs -elif [ -r /etc/rc.conf ]; then - . /etc/rc.conf -fi +# +# Add the following lines to /etc/rc.conf to enable radiusd: +# +# radiusd_enable="YES" +# -prog=$(realpath $0) || exit 1 -dir=${prog%/*} -PREFIX=${dir%/etc/rc.d} +. %%RC_SUBR%% -if [ ."$dir" = ."$prog" -o ."$PREFIX" = ."$dir" ] -then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi +name=radiusd +rcvar=`set_rcvar` -case $1 in -start) - "$PREFIX"/sbin/radiusd $RADIUSD_FLAGS && echo -n " radiusd" - ;; -stop) - if [ -f /var/run/radiusd/radiusd.pid ]; then - kill `cat /var/run/radiusd/radiusd.pid` && echo -n ' radiusd' - fi - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; -esac +command=%%PREFIX%%/sbin/radiusd +radiusd_config=${radiusd_config:-"%%PREFIX%%/etc/raddb/radiusd.conf"} +required_files=${radiusd_config} +pidfile=/var/run/radiusd/radiusd.pid -exit 0 +radiusd_enable=${radiusd_enable:-"NO"} + +load_rc_config $name +run_rc_command "$1" |