I was thinking of a way to simplify the update-motd-static.d directory, and I think this is a good way to approach it. It requires use of https://github.com/dimo414/bkt, but it simplifies needing to generate a new motd script file. bkt can cache the output of a command for a duration with --ttl, and you can also force update the cache with --force. This way, it should never hang when the user is logging in to see the updates available on the raspberry pi (or other device).
I also saw an opportunity to simplify the bash script a bit,
I was thinking of a way to simplify the
update-motd-static.d
directory, and I think this is a good way to approach it. It requires use of https://github.com/dimo414/bkt, but it simplifies needing to generate a new motd script file.bkt
can cache the output of a command for a duration with--ttl
, and you can also force update the cache with--force
. This way, it should never hang when the user is logging in to see the updates available on the raspberry pi (or other device).I also saw an opportunity to simplify the bash script a bit,