A small shell script to manage /etc/motd.
Install bin/update-motd somewhere on your $PATH.
Create /etc/update-motd.d/ and put the scripts to generate the MOTD in it. Ensure they are executable.
If packaging this program, /usr/share/update-motd.d/ can be used as a fallback path for system defaults.
On systems with runit and snooze (like Void Linux), the service in runit/ can be used.
Otherwise, a cronjob, systemd timer, or similar method for running update-motd periodically works.
See here for an example package template for motdd.
Two examples of scripts are provided:
A simple MOTD.
A showy MOTD. Requires:
- lolcat
- figlet
- curl
- docker (optional)
- xbps (optional)

