datafruits / radio

liquidsoap and icecast configuration for streampusher
8 stars 1 forks source link

Set up logrotate for icecast service #22

Open rbxbx opened 2 years ago

rbxbx commented 2 years ago

Not 100% sure this is correct -- the container builds and ssh'ing in and running

$ logrotate -d /etc/logrotate.d/icecast.conf
reading config file /etc/logrotate.d/icecast.conf

Handling 1 logs

rotating pattern: /usr/local/share/icecast/logs/*.log  52428800 bytes (4 rotations)
empty log files are not rotated, old logs are removed
considering log /usr/local/share/icecast/logs/access.log
  log does not need rotating
considering log /usr/local/share/icecast/logs/error.log
  log does not need rotating
not running postrotate script, since no logs were rotated

appears that there at least aren't syntax errors -- not 100% sure the postrotate call is correct. Per the icecast docs

Note that on non-win32 platforms, a HUP signal can be sent to Icecast in which the log files are re-opened for appending giving the ability move/remove the log files.

Thoughts?

mcfiredrill commented 2 years ago

Thanks again for working on this. After we discussed this in the discord a bit, I think we are going to try to go with this approach instead. https://github.com/datafruits/streampusher-api/pull/147