Skip to content

sbbs still keeps log file open after logrotate

I have sbbs running with systemd on debian use rsyslog with the following config (according to rsyslog.d/sbbslog.conf) to generate /var/log/sbbs.log

local3.* /var/log/sbbs.log

I also have a setup the rotate:

/var/log/sbbs.log {
     weekly
     maxsize 1G
     missingok
     rotate 10
     notifempty
     create 640 root adm
     maxage 90
}

The rotation works ok, but sbbs keeps writing the previous file

imagen

What is the best way to add a postrotate to tell the sbbs process to reopen the log files via systemd reload / kill etc ?

 ...
 sharedscripts
   postrotate
       systemctl restart sbbs > /dev/null
   endscript
 ....

Is it possible for this to happen without restarting the bbs?