port freeradius to buildroot-ng
[openwrt/svn-archive/archive.git] / net / freeradius / files / radiusd.init
1 #!/bin/sh
2
3 DEFAULT=/etc/default/radiusd
4 LOG_D=/var/log/radius
5 RUN_D=/var/run
6 PID_F=$RUN_D/radiusd.pid
7 [ -f $DEFAULT ] && . $DEFAULT
8
9 case $1 in
10 start)
11 [ -d $LOG_D ] || mkdir -p $LOG_D
12 [ -d $RUN_D ] || mkdir -p $RUN_D
13 radiusd $OPTIONS
14 ;;
15 stop)
16 [ -f $PID_F ] && kill $(cat $PID_F)
17 ;;
18 *)
19 echo "usage: $0 (start|stop)"
20 exit 1
21 esac
22
23 exit $?