pentoo-overlay/net-dialup/freeradius/files/radius.init-r3
2014-05-18 14:50:12 +00:00

32 lines
846 B
Text

#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dialup/freeradius/files/radius.init-r3,v 1.4 2014/05/03 15:47:45 jer Exp $
command=/usr/sbin/radiusd
command_args="${RADIUSD_OPTS}"
pidfile="${pidfile:-/run/radiusd/radiusd.pid}"
extra_started_commands="reload"
depend() {
need localmount
use dns
}
start_pre() {
if [ ! -f /etc/raddb/radiusd.conf ] ; then
eerror "No /etc/raddb/radiusd.conf file exists!"
return 1
fi
checkpath -m0750 -o "${RADIUSD_USER:-root}:${RADIUSD_GROUP:-root}" -d \
$(dirname ${pidfile}) /var/log/radius
checkpath -m0750 -o "${RADIUSD_USER:-root}:${RADIUSD_GROUP:-root}" -d \
$(dirname ${pidfile}) /run/radius
}
reload() {
ebegin "Reloading radiusd"
kill -HUP $(cat ${pidfile})
eend $?
}