Ticket #4930: radiusd.2.init

File radiusd.2.init, 390 bytes (added by jake1981 <oskari.rauta@…>, 8 years ago)

uses uci to fetch lan ip addr from /etc/config/network

Line 
1#!/bin/sh /etc/rc.common
2# Copyright (C) 2006 OpenWrt.org
3START=50
4
5DEFAULT=/etc/default/radiusd
6LOG_D=/var/log
7RUN_D=/var/run
8PID_F=$RUN_D/radiusd.pid
9RADACCT_D=/var/db/radacct
10
11start() {
12        [ -f $DEFAULT ] && . $DEFAULT
13        mkdir -p $LOG_D
14        mkdir -p $RUN_D
15        mkdir -p $RADACCT_D
16        radiusd -i $(uci get network.lan.ipaddr) -p 1812,1813 $OPTIONS
17}
18
19stop() {
20        [ -f $PID_F ] && kill $(cat $PID_F)
21}