Radiator RC.D File Example
# Radiator RC.D Example
# Last updated 10-29-2003
# By Bret Jordan
#
# ----- Begin rc.d file -----
#!/bin/sh
#
# Startup script for the Radiator Server
# Last modified 08-25-2003
# chkconfig: 345 50 20
# description: Radiator is a Raduis server.
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Path to server binary
#program=radiator
program="/usr/bin/perl -I /usr/local/radiator/Radiator-3.6 /usr/local/radiator/Radiator-3.6/radiusd -config_file /usr/local/radiator/etc/radius.cfg"
program_name=Radiator
RETVAL=0
start ()
{
daemon $program
}
stop ()
{
killproc radiator
}
# See how we were called.
case "$1" in
start)
echo -n "Starting $program_name... "
start
echo
;;
stop)
echo -n "Shutting down $program_name... "
stop
echo
;;
restart)
echo "Restarting $program_name... "
$0 stop
$0 start
;;
status)
status $program
;;
*)
echo "Usage: $proggram_name {start|stop|restart|status}"
exit 1
esac
exit $RETVAL
# ----- End rc.d file -----