-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logrotate Error #1507
Comments
What is the content of your Is there any error when running manually |
Seems all good here. Normally it is working fine. Just last night it seemed to fail. |
I think my fix was less than stellar, but the error only occurs when the freshclam logs have been rotated. I commented out the postrotate action, but only a comment inside an if statement is apparently not correct. This can be ignored (the file has already been rotated) but it should of course be fixed. |
I think the issue is in
If I compare with
AFAIK freshclam is not run as daemon. Supervisorctl will fail silently. Not sure if it is a problem... |
Alright. Is the directory We should eliminate the whole |
Freshclam runs from cron, not as a daemon. The whole postrotate block (from postrotate to endscript?) should be removed, it is not needed. |
@gmasse You were faster than me! Thanks for fixing! :) |
Fix #1507 - Do not try to reload freshclam daemon after log rotation
Hello,
i have the same problem. Since 3 weeks I get a cron error mail with subject
"Cron <root@mail> test -x /usr/sbin/anacron || ( cd / &&
run-parts --report /etc/cron.daily )"
and content says
/etc/cron.daily/logrotate:
logrotate_script: 6: logrotate_script: Syntax error: "fi" unexpected
error: error running non-shared postrotate script for /var/log/mail/freshclam.log of '/var/log/mail/freshclam.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
Problem is this commented line. Today I've run the update with lastet
but its still commented.
Regards
Helmut
Am 17.05.20 um 18:18 schrieb Germain Masse:
…
I think the issue is in |/etc/logrotate.d/clamav-freshclam|
|/var/log/mail/freshclam.log { rotate 12 weekly compress delaycompress
missingok create 640 clamav adm postrotate if [ -d /run/systemd/system
]; then systemctl -q is-active clamav-freshclam && systemctl kill
--signal=SIGHUP clamav-freshclam || true else #invoke-rc.d
clamav-freshclam reload-log > /dev/null || true fi endscript } |
If I compare with |clamav-daemon|, if suppose the commented line would
be replaced by:
|/usr/bin/supervisorctl signal hup clamav-freshclam >/dev/null || true |
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1507 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC7UW3BGJ4WF33NOGYSSOQLRSAE5ZANCNFSM4M5IRLVQ>.
|
@helmutundarnold this has been fixed in latest and in 7.0.1. Perhaps you didn't recreate the container (compose down/up) or something? This is the logrotate job I have:
As you can see there is no commented invoke-rc.d left. |
Thanks for this quick Answer Erik,
indeed I've just run
docker-compose -f <path to>/docker-compose.yml -p <container> pull
After recreating the container its solved.
Thanks for all your Support
Best Regards
Helmut
Am 29.05.20 um 07:36 schrieb Erik Wramner:
…
@helmutundarnold <https://github.com/helmutundarnold> this has been
fixed in latest and in 7.0.1. Perhaps you didn't recreate the
container (compose down/up) or something? This is the logrotate job I
have:
|/var/log/mail/freshclam.log { rotate 12 weekly compress delaycompress
missingok create 640 clamav adm } |
As you can see there is no commented invoke-rc.d left.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1507 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC7UW3CELRTN2Q2PV6XN7P3RT5CUPANCNFSM4M5IRLVQ>.
|
Got this today:
The text was updated successfully, but these errors were encountered: