Skip site navigation (1)Skip section navigation (2)
Date:      14 Jan 2001 17:18:17 +0100
From:      Norbert Koch <nk@LF.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Starting daemons in rc.local
Message-ID:  <vzzogum7jq.fsf@lamia.LF.net>
In-Reply-To: <20010114105201.B4581@poeza.iconnect.co.ke>
References:  <20010113220443.A528@poeza.iconnect.co.ke> <005e01c07d97$b7fdef60$1200a8c0@gsicomp.on.ca> <vzy9wfxn16.fsf@lamia.LF.net> <20010114105201.B4581@poeza.iconnect.co.ke>

next in thread | previous in thread | raw e-mail | index | archive | help
Odhiambo Washington <wash@iconnect.co.ke> writes:

Hi!

> * Norbert Koch <nk@LF.net> [20010113 22:37]: writing on the subject 'Re: Starting daemons in rc.local'
> Norbert> "Matthew Emmerton" <matt@gsicomp.on.ca> writes:
> Norbert> 
[...]
> Exactly. That is where my problem lies. I even saw FreeBSD 4.2-STABLE
> warn me to make the scripts to recognise start and stop..hey..and that
> coding scares me - I am still doing "man sh" to start off..;-)

Allright, here is something to begin with:

#!/bin/sh

case $1 in
	start)
		if [ -x /sbin/radiusd ]; then
			/sbin/radiusd -d /etc/raddb -a /var/adm/radacct && echo " radius"
		fi		
		;;
	stop)
		kill -TERM `cat /var/run/radiusd.pid`
		;;
	*)
		echo "USAGE $0 (start|stop)"
		exit 1
esac


This assumes that creates a PID file as /var/run/radiusd.pid, so
please adapt to your needs. Put it into /usr/local/etc and test it
before rebooting the system :-)

norbert.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vzzogum7jq.fsf>