rsyslog and logrotate configuration for Alpine Linux
- Shell 100%
| etc/logrotate.script | ||
| LICENSE | ||
| README.md | ||
| VERSION | ||
snix-alpine-rsyslog
rsyslog and logrotate configuration for Alpine Linux.
Structure
etc/
logrotate.script/
helper # archives a log to /var/log/logs before rotation, cleans entries older than 30 days
convert # adds prerotate helper block to all files in /etc/logrotate.d/
Flow
logrotate → prerotate → helper <name> → /var/log/logs/<name>.YYYY.MM.DD_HH.MM
→ /var/log/<name> (or <name>.log as fallback)
Usage
Run convert once to patch existing logrotate configs:
/etc/logrotate.script/convert
It skips files that already reference the helper.