3 # Check the RADIUS server configuration files.
5 # If everything is OK, this script exits without an error.
7 # If there was an error parsing the configuration files, this script
8 # prints the errors to the screen, and exits with an error.
10 # This process presumes, of course, that there weren't any DNS
11 # problems causing the server to wait forever on startup.
13 # AUTHOR: Alan DeKok <aland@ox.org>
14 # Wed Apr 12 15:21:51 EDT 2000
18 exec_prefix=@exec_prefix@
20 sysconfdir=@sysconfdir@
23 if [ "$1" = "-h" ]; then
25 echo Usage: check-radiusd-config
27 echo Checks the radius daemon server configuration for errors.
32 # Run the server as a background process, picking a high port
33 # that (we hope) no one else is using.
35 # Note that you might have to add a '-d raddb' to the command line
36 # options, if your database is somewhere other than /etc/raddb
38 $sbindir/radiusd -X -p 32768 > startup.log 2>&1 &
41 # Remember what it's process ID was.
46 # The server will run in the background until it's killed, so
47 # we need another background job to kill it, after it's read
48 # the configuration files, and is (possibly) running in debug mode.
50 (sleep 2 && kill -9 $RADIUSD_PID) > /dev/null 2>&1 &
53 # Wait for it to exit with an error (1), or from being killed (137)
59 # If the server died with an error, then show the startup error log.
61 if test "$RADIUSD_STATUS" = "1"; then
65 echo Radius server configuration looks OK.