Hi everyone,
I'm trying to configure log rotation via newsyslog for ZoneMinder. Problem is that, according to ZoneMinder's recommendation, I need to execute a command upon log rotation, rather than sending a PID a signal, and that command takes an argument.
The configuration I have so far looks like this:
But a syntax test reveals that newsyslog rejects that:
If I remove the "logrot" argument, even it it's by inserting a # comment right before it, then the syntax check passes, but that'd be an invalid invocation of the zmpkg.pl command, as the argument is required.
Quoting the command as either "/usr/local/bin/zmpkg.pl logrot" or '/usr/local/bin/zmpkg.pl logrot' don't help, with newsyslog still producing the "illegal signal" error in either case.
So, in short, is there a way to configure newsyslog log rotation to execute a command that takes arguments?
Thank you!
I'm trying to configure log rotation via newsyslog for ZoneMinder. Problem is that, according to ZoneMinder's recommendation, I need to execute a command upon log rotation, rather than sending a PID a signal, and that command takes an argument.
The configuration I have so far looks like this:
Code:
/var/log/zm/*.log www:www 640 7 * $D0 GJR /usr/local/bin/zmpkg.pl logrot
But a syntax test reveals that newsyslog rejects that:
Code:
-> newsyslog -nvv
(…)
newsyslog: illegal signal in config file:
/var/log/zm/*.log www:www 640 7 * $D0 GJR /usr/local/bin/zmpkg.pl logrot
(…)
If I remove the "logrot" argument, even it it's by inserting a # comment right before it, then the syntax check passes, but that'd be an invalid invocation of the zmpkg.pl command, as the argument is required.
Quoting the command as either "/usr/local/bin/zmpkg.pl logrot" or '/usr/local/bin/zmpkg.pl logrot' don't help, with newsyslog still producing the "illegal signal" error in either case.
So, in short, is there a way to configure newsyslog log rotation to execute a command that takes arguments?
Thank you!