iRedAPD icon indicating copy to clipboard operation
iRedAPD copied to clipboard

iRedAPD logrotate script generates Cron error messages

Open clickbg opened this issue 2 years ago • 2 comments

Hi,

This is a very minor bug which unfortunately generates tickets from our systems since we monitor every cron output. Basically in https://github.com/iredmail/iRedAPD/blob/114f99384369e28933b64216584a7b9ba6f951e9/samples/logrotate.d/iredapd#L10-L12

Generates output:

/etc/cron.daily/logrotate:

Redirecting to /bin/systemctl restart rsyslog.service

Which causes our systems to log an incident since it`s not expected that a cronjob would generate unhanded messages in the error output.

Could you please change it to something like this, taken from the rsyslog logrotate job:

    postrotate
        /usr/bin/systemctl -s HUP kill rsyslog.service >/dev/null 2>&1 || true
    endscript

Since currently we have to apply this fix after every iRedAPD upgrade.

Thank you for the amazing software!

clickbg avatar Aug 27 '23 05:08 clickbg

Would you like to send a pull request? :)

iredmail avatar Aug 28 '23 03:08 iredmail

Sure, sorry for not starting with this. I have created https://github.com/iredmail/iRedAPD/pull/18

Thanks!

clickbg avatar Aug 28 '23 04:08 clickbg