thiagowfx's avatar

Β¬ just serendipity πŸ€ (not just serendipity)

apk autoupdate on alpine linux

β€’ 114 words β€’ 1 min β€’ updated

⚠️ This post is over one year old. It may no longer be up to date or relevant. Opinions may have changed.

Problem statement: Upon running doas apk upgrade on Alpine Linux, select packages with binaries backed by system services should be automatically restarted.

Deb-based systems have checkrestart(8).

On Alpine, the best available approach as of today is https://github.com/jirutka/apk-autoupdate/:

shell
doas apk add apk-autoupdate
$EDITOR /etc/apk/autoupdate.conf

Then make the two following changes1:

# Because the default is '*', which will prevent all services from restarting.
services_blacklist=""

# List of services that should be restarted upon package upgrades.
services_whitelist="miniflux tailscale"

From this point on, whenever there are system upgrades for the aforementioned services (doas apk upgrade), they will be automatically restarted. There’s no need for doas /etc/init.d/miniflux restart.


  1. h/t to @fossdd for replying to my https://github.com/jirutka/apk-autoupdate/issues/8 thread. ↩︎