On Sun, 22 Feb 2009 12:37:38 -0500, Matthew Wilson <[email protected]> writes:
> This is a funky problem, and vaguely off-topic.
>
> My webapp writes to five different log files in a directory. I use
> logrotate to rotate the log files daily and then restart my web app.
> The logrotate config looks sort of like:
>
> /var/log/turbogears/*.log {
>
> # Rotate the logs every day.
> daily
>
>
> # Now tell supervisord to restart all these scripts, so that they
> # don't keep logging to the old files.
> postrotate
> supervisorctl restart webapp
> endscript
>
> }
>
> Here's the problem: since I have five log files to rotate, logrotate
> restarts my app five times!
>
> Is there some cool way to tell supervisor that it should only restart
> my webapp if the process is more than, say, one hour old? Then the
> needless restarts would get ignored.
>
> There's probably a solution to this that involves writing a better
> logrotate config, but I haven't figured that out either.
>
> All comments welcome! supervisor is great software.
logrotate sharedscripts?
--
"How can I tell that the road signed to hell - doesn't lead up to heaven?"
-- Peter Hammill; The Comet, The Course, The Tail
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users