File: radreload

package info (click to toggle)
xtradius 1.2.1-beta2-6
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 1,256 kB
  • ctags: 921
  • sloc: ansic: 10,183; perl: 733; sh: 267; makefile: 148; sql: 21
file content (28 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (5)
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
#!/bin/sh

#
# Use this script to reload the configuration of a running radius daemon.
#
# If there are any errors in the configuration files, then a warning message
# will be printed.
#
# If there were no errors, then the running server is sent a HUP signal
# to reload it's database, and the last few lines of the log file are shown.
#
# $Id: radreload,v 1.1 2001/07/26 16:59:39 aland Exp $
#

RADIUSD=/usr/local/sbin/radiusd
RADIUSD_PID=/var/run/radiusd.pid

if $RADIUSD -C
then
	kill -HUP `cat $RADIUSD_PID`
	sleep 1
	tail /var/log/radius.log
else
	echo
	echo "There is an error in one of the radius configuration files you just edited!"
	echo "Please go and fix it or restore a backup file before trying this command again."

fi