packages/net/freeradius2/files/radiusd.init
Daniel Golle 1f312e49af freeradius2: cleanup init script
The initscript originally imported from oldpackages no longer does
the job, sed'ery around ifconfig is just not the way.
Remove stuff which can also be done via /etc/freeradius2/* or
/etc/default/radiusd instead.

Fixes #1769 and #1193

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2015-10-21 03:11:50 +02:00

27 lines
489 B
Bash

#!/bin/sh /etc/rc.common
#
# Copyright (C) 2006-2015 OpenWrt.org
#
USE_PROCD=1
START=50
NAME=radiusd
PROG=/usr/sbin/radiusd
DEFAULT=/etc/default/radiusd
start_service()
{
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p /var/log
mkdir -p /var/run
mkdir -p /var/db/radacct
procd_open_instance
procd_set_param command $PROG
[ -n "$IPADDR" ] && procd_append_param command -i $IPADDR
[ -n "$OPTIONS" ] && procd_append_param command $OPTIONS
procd_set_param respawn
procd_close_instance
}