rsyslog and logrotate configuration for Alpine Linux
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sam 0dd7a33d1f build: pick the highest version tag, not the newest one
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.
2026-09-02 15:57:11 +02:00
etc/logrotate.script update 2026-04-07 11:01:29 +02:00
APKBUILD build: pick the highest version tag, not the newest one 2026-09-02 15:57:11 +02:00
LICENSE Aggiungi LICENSE 2026-03-27 19:10:57 +00:00
README.md Aggiungi README.md 2026-03-27 19:11:40 +00:00

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.