procmail
[Top] [All Lists]

Re: Procmail log w/root-tail

2000-01-21 11:04:15
On Fri, 21 Jan 2000, Philip Guenther wrote:

pg> "S.Toms" <tomas(_at_)primenet(_dot_)com> writes:
pg> >
pg> >  Maybe a way to relink root-tail to the original logfile, or a way to
pg> >prevent mailstat from making the file link change when it runs.
pg> 
pg> Kill and restart the tail when you run mailstat.  This can be as simple
pg> as putting the tail in a shell script that catches a signal:
pg> 
pg>     #!/bin/sh
pg>     logfile=$1
pg>     trap 'kill $PID' 1 15
pg>     while :
pg>     do
pg>         tail -f $logfile &
pg>         PID=$!
pg>         wait
pg>     done
pg> 
pg> Is you send signal 1 (HUP) or 15 (TERM, the default) to the shell running
pg> that script, it'll kill and restart the tail.  You can even just kill
pg> the tail itself and it'll restart it.
pg> 

  That's kinda what I was doing at the moment, but It just seemed like I
shouldn't have to do it that way. Reto showed me a fix in the actual
mailstat file that does what I thought it should have done all along.
  Thanks for the idea above, I have another use for that :)

pg> 
pg> Philip Guenther
pg> 

-- 
        S.Toms - tomas(_at_)primenet(_dot_)com - homepage is in the works
                   SuSE Linux v6.2+ - Kernel 2.2.13

"I'd love to go out with you, but I'm attending the opening of my
garage door."


<Prev in Thread] Current Thread [Next in Thread>