I will give an example of the Bird log rotation script, since by default it was not in Ubuntu 18 and in neighboring versions too.
It is worth considering that the log rotation script will re-read the bird configuration every time, so if you change it, then apply it immediately, otherwise the script will apply it later, which can lead to unforeseen consequences.
After each rotation, two entries will be added to the logs:
Let’s create a bird log rotation script:
Here is an example of content:
/bin/systemctl reload bird
Let’s run the script manually, make sure that the rotation was successful and a new empty bird.log file was created:
logrotate --force /etc/logrotate.d/bird