Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
If the answer helped you, please consider marking it as accepted. If it hasn't helped, leave a comment and I can follow up. –  Aaron Copley Dec 11 '12 at 12:50

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.