boa icon indicating copy to clipboard operation
boa copied to clipboard

Logrotate: Error running shared postrotate script

Open dserrato opened this issue 2 years ago • 1 comments

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

dserrato avatar Nov 30 '23 17:11 dserrato

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*

omega8cc avatar Dec 23 '23 06:12 omega8cc