[nycbug-talk] savelogs
    Jim Brown 
    jpb
       
    Thu Feb 24 09:52:16 EST 2005
    
    
  
* Dru <dlavigne6 at sympatico.ca> [2005-02-24 10:38]:
> 
> 
> On Thu, 24 Feb 2005, Brad Schonhorst wrote:
> 
> >>Anyone have any idea what I'm missing here? I'm using sysutils/savelogs 
> >>on a FreeBSD 5.2.1 system to rotate and compress logs. Works beautifully 
> >>from the command line whether I'm in the tcsh or the sh shell.
> >>
> >>However, as soon as I script it (Bourne shell script, simply has the same 
> >>command I run at the command line), it runs TWICE, resulting in an empty 
> >>log file.
> Testing the script. It's real simple (simply the commands I run at the 
> command line:)
> 
> #!/bin/sh
> cd /var/log
> /usr/local/bin/savelogs --config=/usr/local/etc/savelogs.conf messages
> /usr/local/bin/savelogs --config=/usr/local/etc/savelogs.conf maillog
> 
Um, you are running two separate instances in your script, back to back.
How about a sleep between them?  Maybe you are running into a race problem
when the other script starts...
Just a thought.
Jim B.
    
    
More information about the talk
mailing list