#4219 Virtualmin inconsistent and sometimes wrong rotation info

closed-fixed
Jamie Cameron
5
2013-04-09
2013-04-09
Mike Robinson
No

In /etc/logrotate I noticed that for Virtualmin servers and sub-servers, we have something similar to:

/var/log/virtualmin/site.com_access_log /var/log/virtualmin/site.com_error_log {
rotate 5
weekly
compress
postrotate
/etc/rc.d/init.d/httpd graceful ; sleep 5
endscript
}

In the command that is run after rotation, it seems to be inconsistent and even wrong for certain sub-servers. For example, I have a domain with 5 sub-servers and 4 of the 5 use the (incorrect) above command. The problem is that this is on Debian, and /etc/rc.d/init.d/ doesn't even exist. Others instead have:

/usr/sbin/apache2ctl graceful ; sleep 5

others have:

apache2ctl graceful ; sleep 5

and others just have:

apache2ctl graceful

For sake of consistency, one of these should be chosen instead of having several different ways. And whether we sleep or not should also be made consistent. Of course, on Debian, whatever is causing the config file to try to execute something from a non-existing directory should be corrected.

Discussion

  • Jamie Cameron
    Jamie Cameron
    2013-04-09

    That command does look wrong for Debian. Was this domain perhaps migrated from another system via a backup and restore?

     
  • Mike Robinson
    Mike Robinson
    2013-04-09

    I had never thought of that. Yes, that's exactly what happened. It was migrated from CentOS to Debian.

     
  • Jamie Cameron
    Jamie Cameron
    2013-04-09

    • status: open --> closed-fixed
     
  • Jamie Cameron
    Jamie Cameron
    2013-04-09

    OK, I see the bug now .. this will be fixed in the next Virtualmin release.