TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:19180] debian: running init scripts from cron



Troy,

I'm using 'radiusd-cistron-1.6.3' on both the Mandrake6.0 and the Debian2.2
server that is to be its replacement.  This radiusd implementation _does_
need to be restarted (or maybe just reloaded) after a users file change.

I simplified on the original post.  What I'm actually doing is running a perl
script from cron at 5 minute intervals that first does a diff of the users
file against a previously saved version and if it detects a change, it then
calls the /etc/init.d/radiusd script.  I have already tried a 'restart' and a
'stop; ... sleep 2;  start' and neither works.  The perl script properly
detects that the users file has been changed, and it executes the init
script; AND I get stdout messages that the service has been stopped and
started, but its lying .. the pid has not changed.  Everything works as it
should when the perl script is executed from the command line instead of
from  cron.

Thats why I'm just wondering if I'm not understanding some Debian policy that
is preventing the execution of the radiusd daemon's from cron.

-John


"Troy A. Johnson" wrote:

> John,
>
> Is it the same radius server (can you say which one)? If it is a
> different server altogether it may be possible for radiusd to reread its
> configuration files without actually stopping and starting the server.
> If you've confirmed that this is not the case, you may want to call a
> script to do your restart:
>
> /etc/init.d/radiusd stop
> # sleep 1
> /etc/init.d/radiusd start
>
> The sleep is probably unnecessary, but it may stop some problems from
> occurring.
>
> HTH
>
> Troy
>
> John Hawley wrote:
> >
> > Hello,
> >
> > I'm sure this is quite the Debian rookie question, but is there some
> > trick to getting an init script to run from cron?  I'm running a radius
> > server that needs restarted when the users file is modified, and just
> > rerunning the init script from cron worked fine under Mandrake but fails
> > under Debian.  I get the messages from the /etc/init.d/radiusd script
> > that radiusd has been restarted, but the pid on the process has not
> > changed, so I know it wasn't actually done.  Running the script manually
> > from root works fine.
> >
> > Am I missing some security related thing here?  Let me know if I should
> > post more detail.  Thanks.
> >