Date: Thu, 8 May 1997 18:42:02 +0100 (BST) From: Scot Elliott <scot@poptart.org> To: Anthony Barlow <tony@mail.warp.co.uk> Cc: freebsd-questions@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG Subject: Re: Script to check if porgram is running Message-ID: <Pine.BSF.3.91.970508183629.4553A-100000@homer.duff-beer.com> In-Reply-To: <199705081550.QAA09361@mail.warp.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 May 1997, Anthony Barlow wrote: > Hi > > Does anyone have a script to check if radiusd is running that can be run > from the cron? > > After a few login failures it seems to exit with the following: > > exited on signal 10 (core dumped) > > Regards, > Anthony > > Well kind-of... I use the script below to keep PPP up during certain free- call hours. Just change the PPP process name to radiusd: -------------------------------------------------------------------------- #!/usr/bin/perl $PPPcommand="ppp -auto bogo"; open( InPipe, "ps -xa|"); # make sure PPP isn't running for( <InPipe> ) { $thisProc = $_; $thisProc =~ /([0-9]+).+\b[0-9]+\b\s(.*)$/; # $1 is PID; $2 is process name $PID = $1; $NAME=$2; if( "$NAME" eq "$PPPcommand" ) { exit; } } close (InPipe); # OK - PPP not running - so start it and restart socks system($PPPcommand); -------------------------------------------------------------------------- Scot. ----------------------------------------------------------------------------- Scot Elliott scot@poptart.org Tel: +44 (0)171 2322924 ----------------------------------------------------------------------------- Public key available by finger at: finger scot@poptart.org or at: http://www.poptart.org/pgpkey.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970508183629.4553A-100000>