rsyslog and logrotate configuration for Alpine Linux
- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The tags API returns tags newest-first by date, so taking the first element meant a tag added later on an older branch, or a moving name like stable, would win over the highest version. Filter to the v<number> form and sort by version instead. Requesting 50 tags rather than 1: that is the per-page maximum this Forgejo returns whatever limit is asked for, so a repository with more than 50 version tags would need paging. |
||
| etc/logrotate.script | ||
| APKBUILD | ||
| LICENSE | ||
| README.md | ||
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.