summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup/freeradius/files/radius.init-r3')
-rw-r--r--net-dialup/freeradius/files/radius.init-r330
1 files changed, 30 insertions, 0 deletions
diff --git a/net-dialup/freeradius/files/radius.init-r3 b/net-dialup/freeradius/files/radius.init-r3
new file mode 100644
index 000000000000..3195416e8499
--- /dev/null
+++ b/net-dialup/freeradius/files/radius.init-r3
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2012 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.1 2012/09/30 07:01:04 flameeyes Exp $
+
+command=/usr/sbin/radiusd
+command_args="${RADIUSD_OPTS}"
+pidfile="${pidfile:-/var/run/radiusd/radiusd.pid}"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ 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
+}
+
+reload() {
+ ebegin "Reloading radiusd"
+ kill -HUP $(cat /var/run/radiusd/radiusd.pid)
+ eend $?
+}