i-MSCP installer shouldn't assume rsyslog as system log daemon

    • System Debian 9
    • Imscp 1.5.1


    1. /var/log/syslog{ rotate 7 daily missingok notifempty delaycompress compress postrotate invoke-rc.d --quiet rsyslog rotate > /dev/null endscript}/var/log/mail.info/var/log/mail.warn/var/log/mail.err/var/log/mail.log{ rotate 7 daily missingok notifempty compress delaycompress sharedscripts postrotate invoke-rc.d --quiet rsyslog rotate > /dev/null endscript}/var/log/daemon.log/var/log/kern.log/var/log/auth.log/var/log/user.log/var/log/lpr.log/var/log/cron.log/var/log/debug/var/log/messages{ rotate 4 daily missingok notifempty compress delaycompress sharedscripts postrotate invoke-rc.d --quiet rsyslog rotate > /dev/null endscript}

    Mail from System:

  • @lugau45

    I moved your post in a new thread. Next time, don't pollute other threads. That the last time I warn you.

    Regarding your problem, it seem that you're running syslog-ng while rsyslog is expected.

    Please provide us with the result of the following commands;

    1. dpkg-query -W -f='${Status} ${Version}\n' syslog-ng

    1. dpkg-query -W -f='${Status} ${Version}\n' rsyslog

    1. ls -la /etc/logrotate.d


  • @lugau45

    I was able to reproduce the problem as follows:

    1. apt-get purge rsyslogapt-get install syslog-ngperl imscp-autoinstall -dasnvlogrotate -v -f /etc/logrotate.d/rsyslog


    1. .../usr/sbin/invoke-rc.d: 523: /usr/sbin/invoke-rc.d: /etc/init.d/rsyslog: not founderror: error running non-shared postrotate script for /var/log/syslog of '/var/log/syslog'...

    Clearly speaking, that is a bug in i-MSCP installer which assumes that rsyslog is used as system log daemon (rsyslog is the default system log daemon under Debian/Ubuntu). However there are drop-in replacement available such as syslog-ng. Some VM providers provision their images with syslog-ng instead of rsyslog. There are also administrators that prefer syslog-ng over rsyslog...

    Whatever the reason, i-MSCP shouldn't assume rsyslog as system log daemon. It should install its own rsyslog LOGROTATE(8) configuration file only if rsyslog is effectively installed on the system. This issue will be fixed in next release (1.5.2).

    As q quick fix, you can remove the LOGROTATE(8) configuration file manually:

    1. rm /etc/logrotate.d/rsyslog

    However, be in minde that if you run the i-MSCP installer again (from version 1.5.1), the file will be reinstalled.


  • A fix has been added in our development branch. See https://github.com/i-MSCP/imsc…bfbb1c9cbfd905e30d4516190
    This fix will be part of next release.

    Thank you for your report.
    Thread closed.