boa
boa copied to clipboard
Logrotate: Error running shared postrotate script
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
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*