summaryrefslogtreecommitdiffstats
path: root/openwrt/package/freeradius/files/radiusd.init
blob: 3ec16896acdb995ee5128cf1ef48c0144a3f90e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

DEFAULT=/etc/default/radiusd
LOG_D=/var/log/radius
RUN_D=/var/run
PID_F=$RUN_D/radiusd.pid
[ -f $DEFAULT ] && . $DEFAULT

case $1 in
 start)
  [ -d $LOG_D ] || mkdir -p $LOG_D
  [ -d $RUN_D ] || mkdir -p $RUN_D
  radiusd $OPTIONS
  ;;
 stop)
  [ -f $PID_F ] && kill $(cat $PID_F)
  ;;
 *)
  echo "usage: $0 (start|stop)"
  exit 1
esac

exit $?