You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
428 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2006 OpenWrt.org
  3. START=50
  4. DEFAULT=/etc/default/radiusd
  5. LOG_D=/var/log
  6. RUN_D=/var/run
  7. PID_F=$RUN_D/radiusd.pid
  8. RADACCT_D=/var/db/radacct
  9. IPADDR=$(ifconfig br-lan | sed -n 's/.*dr:\(.*\)Bc.*/\1/p')
  10. start() {
  11. [ -f $DEFAULT ] && . $DEFAULT
  12. mkdir -p $LOG_D
  13. mkdir -p $RUN_D
  14. mkdir -p $RADACCT_D
  15. radiusd -i $IPADDR -p 1812,1813 $OPTIONS
  16. }
  17. stop() {
  18. [ -f $PID_F ] && kill $(cat $PID_F)
  19. }