Cron vs. Command Line Problems

David Gavin dgavin at davegavin.com
Mon Aug 9 18:06:19 UTC 2004


 Make sure that you're not running into the restricted $PATH that you get
in a cron job - when the cron script is started, the only directories in
your PATH variable = "/usr/bin:/bin" as a security provision (the service
program is in /sbin). To be sure, either re-set your PATH to what you
need at the beginning of the script or fully qualify all scripts/programs
that you run out of a crontab.

 Dave

Blane Bramble said:
> On Mon, 2004-08-09 at 16:39, Michael Gargiullo wrote:
>> On Sat, 2004-08-07 at 10:59, David Cary Hart wrote:
>> > I have snort set up as a service. From the command line I can do
>> > "service snort restart" and it performs precisely as expected.
>> >
>> > Snort requires a restart after log rotate or it follows the old
>> > alert.log. I have tried to do this a) via a cronned script, b) in the
>> > logrotate script and c) by simply cronning the restart command line
>> with
>> > no joy.
>> >
>> > What am I missing?
>> >
>
> How are you trying to restart it in the logrotate script?
>
> Blane.
>
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>





More information about the fedora-list mailing list