1

If there are errors in the postrotate script block, where are they logged in Ubuntu?

1
  • If the answer helped you, please consider marking it as accepted. If it hasn't helped, leave a comment and I can follow up. Dec 11, 2012 at 12:50

1 Answer 1

1

I am pretty sure any errors are just dumped to stderr. You should be able to redirect your postrotate to a file with basic I/O redirection. I'm not sure if Ubuntu has the same file, but there should be an equivalent to the following;

Looking in my /etc/logrotate.d/syslog, I see that the /bin/kill command's stderr is redirected to /dev/null. There's no reason this couldn't be changed to a regular file descriptor.

/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .