In lots of online posts regarding how to rotate your iptables log files, for example here rsyslog config files get reloaded by the postrotate option of logrotate, presumably in order to stop rsyslog from writing to the old (now compressed or renamed logfile) and to the new logfile. Usually this looks like

            invoke-rc.d rsyslog rotate > /dev/null

I believe this is now outdated, since rsyslog has been converted to upstart, and is no longer Sys V Init so something along the lines of

service rsyslog reload > /dev/null

is probably the way to go.

But what about the "rotate" action? (I think it was a logrotate custom action...somehow set via policy-rc.d perhaps..). I presume for Sys V Init this was somehow superior to a simple reload/restart (although I don't know exactly why), is it possible or desired in the new upstart framework to get logrotate use a "rotate" action to restart rsyslog rather than just doing a reload?


Upstart is an init system, not a log rotater. Use a simple shell script (not an init script though) to rotate the logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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