Hi all,
I have installed syslog-ng (balabit/syslog-ng) in a docker container and pointed OMV to it and it is working fine.
I want to be able to rotate the logs so I'm using syslog-ng's built-in logrotate file /etc/logrotate.d/syslog-ng:
Code
root@omv:/etc# docker exec syslog-ng cat /etc/logrotate.d/syslog-ng
/var/log/syslog
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
invoke-rc.d syslog-ng reload > /dev/null
endscript
}
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
/var/log/error
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
invoke-rc.d syslog-ng reload > /dev/null
endscript
}
root@omv:/etc#
Alles anzeigen
However I'm getting the following error:
Code
root@omv:/etc# docker exec syslog-ng /usr/sbin/logrotate -f /etc/logrotate.d/syslog-ng
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of reload.
root@omv:/etc#
The problem seems to be doing the reload of syslog-ng.
I've tried several ideas that I found on the internet but none has fixed the problem.
Any ideas greatly appreciated.
TIA