help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-gnu-radius] Booting Radius upon Server Bootup.


From: Gerald
Subject: RE: [Help-gnu-radius] Booting Radius upon Server Bootup.
Date: Mon, 13 Oct 2003 11:24:16 -0400 (EDT)

On Sat, 11 Oct 2003, Cline Communications, Corp. wrote:

> I am running RedHat 8.0, I believe on this machine.

Redhat uses a unique startup script system.

/etc/rc.d/init.d/ - holds the startup shutdown scripts normally named for
the service they start/stop/restart

/etc/rc.d/rc#.d/ (where # is the init level. Usually something like
radius goes in multi-user rc3.d) - These are the sym links to
the scripts that actually get executed. The links normally start with K
(for kill) S (for start) and the number immediately following is to
maintain control over the order in which the services start.

To properly add a service to redhat:

create a simple shell script that takes input of start/stop/restart named
for the service you would like to add and make sure it is executable
(chmod 755 gnu-radius.sh):

gnu-radius.sh:
#!/bin/sh
case "$1" in
 stop)
        if [ -x /usr/local/sbin/radctl ]; then
                /usr/local/sbin/radctl stop || killall radiusd
        ;;
 start)
        if [ -x /usr/local/sbin/radiusd ]; then
                /usr/local/sbin/radiusd -y && echo -n ' radiusd'
        fi
        ;;
 restart)
        if [ -x /usr/local/sbin/radctl ]; then
                /usr/local/sbin/radctl reload && echo -n ' gnu-radius reloaded'
 *)
        ;;
esac

### End gnu-radius.sh

Then add a sym link to it where you would like it to start:

ln -s /etc/rc.d/init.d/gnu-radius.sh /etc/rc.d/rc3.d/S99gnu-radius
ln -s /etc/rc.d/init.d/gnu-radius.sh /etc/rc.d/rc3.d/K99gnu-radius

Now you can use redhat utilities to maintain/modify the services.

/sbin/service gnu-radius start

Gerald




reply via email to

[Prev in Thread] Current Thread [Next in Thread]