2008-10-13 07:40:10 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
START=50
|
|
|
|
|
|
|
|
DEFAULT=/etc/default/radiusd
|
2009-05-12 09:40:31 +00:00
|
|
|
LOG_D=/var/log
|
2008-10-13 07:40:10 +00:00
|
|
|
RUN_D=/var/run
|
|
|
|
PID_F=$RUN_D/radiusd.pid
|
2009-05-12 09:40:31 +00:00
|
|
|
RADACCT_D=/var/db/radacct
|
|
|
|
IPADDR=$(ifconfig br-lan | sed -n 's/.*dr:\(.*\)Bc.*/\1/p')
|
2008-10-13 07:40:10 +00:00
|
|
|
|
|
|
|
start() {
|
|
|
|
[ -f $DEFAULT ] && . $DEFAULT
|
|
|
|
mkdir -p $LOG_D
|
|
|
|
mkdir -p $RUN_D
|
2009-05-12 09:40:31 +00:00
|
|
|
mkdir -p $RADACCT_D
|
|
|
|
radiusd -i $IPADDR -p 1812,1813 $OPTIONS
|
2008-10-13 07:40:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
[ -f $PID_F ] && kill $(cat $PID_F)
|
|
|
|
}
|