Logrotating and running a command

Giorgos Keramidas keramida at ceid.upatras.gr
Sat Mar 17 19:49:32 UTC 2007


On 2007-03-16 19:22, Jos? Pablo Fern?ndez <pablo.fernandez at rs.com.ar> wrote:
> Hello,
> I need to rotate some logs, but instead of getting the PID out of a
> file and sending a SIGHUP to that process, like newsyslog does, I need
> to run a command.
> Is that possible with newsyslog? how should I do it?

Not directly, but you can easily hack around this by running a daemon
which blocks waiting for a signal and runs the command when newsyslog
signals your daemon ;-)



More information about the freebsd-questions mailing list