Skip to content
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 running shared postrotate script #1768

Open
dserrato opened this issue Nov 30, 2023 · 1 comment
Open

Logrotate: Error running shared postrotate script #1768

dserrato opened this issue Nov 30, 2023 · 1 comment

Comments

@dserrato
Copy link

Hi all.

I have a newly installed BOA setup on latest Devuan Chimera and BOA 5 and I'm getting this daily log message regarding this error:

/etc/cron.daily/logrotate:
error: error running shared postrotate script for '/var/log/nginx/*.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1

I've run my BOA updates a couple days ago, but still receiving this message. Wondering if anyone else is getting this and if it's something I can/need to fix in some way.
Thanks.
Dan

@omega8cc
Copy link
Owner

You may need to edit /etc/logrotate.d/nginx so it looks like below:

/var/log/nginx/*.log {
        daily
        missingok
        rotate 14
        compress
        delaycompress
        notifempty
        create 0640 www-data adm
        sharedscripts
        postrotate
                invoke-rc.d nginx rotate >/dev/null 2>&1
        endscript
}

Also, there are probably files you don't need:

  rm -f /var/log/nginx/speed_cleanup*
  rm -f /var/log/nginx/error.log*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants