Display the Bible Gateway "Verse of the Day" in your Linux MOTD, with systemd integration and translation support.
- Fetches the verse of the day from Bible Gateway (default: NIV)
- Configurable translation (e.g., NIV, ESV, NLT, etc.) via environment variable or /etc/default/motd-verse
- Caches the verse to avoid repeated downloads
- Robust error handling and fallback to last cached verse
- Systemd service and timer for scheduled updates
- Simple install/uninstall scripts
- Easy configuration via /etc/default/motd-verse
Run as root:
./install.sh
This installs the script, systemd unit files, creates /etc/default/motd-verse
if needed, and enables the timer.
Run as root:
./uninstall.sh
You will be prompted to remove the cache and config files.
Configure motd-verse by editing /etc/default/motd-verse
:
TRANSLATION
— Bible translation code (if unset or empty, Bible Gateway's default is used:NIV
)CACHE
— Cache file location (default:/var/cache/motd-verse
)URL
— Override the Bible Gateway API URL (advanced)TIMEOUT
— Timeout in seconds for API requests (default:2
)
Example /etc/default/motd-verse
:
# Bible translation code (e.g., NIV, ESV, NLT)
#TRANSLATION=
# Cache file location
CACHE=/var/cache/motd-verse
# Override the Bible Gateway API URL (advanced)
#URL=https://www.biblegateway.com/votd/get/?format=json
# Timeout in seconds for API requests
TIMEOUT=2
Set TRANSLATION
to any valid Bible Gateway version code, such as:
NIV
— New International Version (Bible Gateway default if TRANSLATION is unset)ESV
— English Standard VersionKJV
— King James VersionNASB
— New American Standard BibleNLT
— New Living Translation
See Bible Gateway versions for a full list.
- The script fetches the verse of the day from Bible Gateway and caches it.
- The systemd timer runs the update hourly and at startup.
- The script is called by the MOTD system to display the verse at login.
- If the verse is not updating, check the timer status:
systemctl status motd-verse.timer
- To force a refresh:
/etc/update-motd.d/50-motd-verse --force
- After changing configuration, restart the timer:
systemctl restart motd-verse.timer
MIT License. Not affiliated with Bible Gateway.