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

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



John,

Much clearer picture, but unfortunately it reveals that I am not the
person with the answer (sorry). The only troubleshooting hints I can
give is to examine the "lying" script carefully and the tests it uses to
determine successful execution, and possibly dumping the environment
from the perl script to see if that reveals any clue. Sorry I couldn't
be more helpful,

Troy

P.S. - What do you think of this radius server? Is it good/bad/ugly?
Just curious.

John Hawley wrote:
> 
> 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.
> > >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org

-- 
Troy Johnson   mailto:john1536@tc.umn.edu   http://umn.edu/~john1536/
The two pillars of `political correctness' are, 
  a) willful ignorance, and
  b) a steadfast refusal to face the truth
	-- George MacDonald Fraser