Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

share|improve this answer

Your Answer


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.