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

    • System Debian 9
    • Imscp 1.5.1


    /etc/logrotate.d/rsyslog

    Code
    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;


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


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


    Shell-Script
    1. ls -la /etc/logrotate.d

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @lugau45


    I was able to reproduce the problem as follows:


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

    Result


    Shell-Script
    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:

    Shell-Script
    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.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • 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.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206