summaryrefslogtreecommitdiff
blob: 11dbd461bc6bc048ff44270a91f6d919a27ef390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/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.2 2012/10/22 02:58:59 flameeyes Exp $

command=/usr/sbin/radiusd
command_args="${RADIUSD_OPTS}"
pidfile="${pidfile:-/var/run/radiusd/radiusd.pid}"
extra_started_commands="reload"

depend() {
    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 $?
}