This fixes two issues with the freeradius package init scripts: - The package installs libraries in /usr/lib/freeradius{2,3}, but the musl dynamic linker won't find them there unless LD_LIBRARY_PATH is set to include this directory. This adds an appropriate env statement to the procd init setup. - procd expects services to stay in the foreground, or it will be unable to properly shut them down again. This adds the -f flag to radiusd to achieve that. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
28 lines
550 B
Bash
28 lines
550 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 -f
|
|
procd_set_param env LD_LIBRARY_PATH=/usr/lib/freeradius3
|
|
[ -n "$IPADDR" ] && procd_append_param command -i $IPADDR
|
|
[ -n "$OPTIONS" ] && procd_append_param command $OPTIONS
|
|
procd_set_param respawn
|
|
procd_close_instance
|
|
}
|