[PLUG] Restart a 'hung'(?) process

Stafford A. Rau srau at rauhaus.org
Wed Mar 2 17:30:04 UTC 2005


* Roderick A. Anderson <raanders at acm.org> [050301 16:38]:
> Where this goes bad is when logrotate moves the file out
> from under colorize , ie. closes the file then opens a new one with the
> same name.

You might want to check out swatch (http://www.sourceforge.net/swatch):

====
NOTES

Upon receiving a ALRM or HUP signal swatch will re-read the
configuration file and restart, except when used with the --daemon
command line option where it will simply exit.  Swatch will terminate
gracefully when it receives a QUIT, TERM, or INT signal.
====

You could then fire off script in the "postrotate" option in your
logrotate configuration that will send swatch a HUP sig.

--Stafford



More information about the PLUG mailing list