packages/net/freeradius2/files/radiusd.init
florian 04775d951c [package] update freeradius2 to 2.1.4, add more modules (#4930)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@15791 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-05-12 09:40:31 +00:00

23 lines
428 B
Bash

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