While fooling around with creating an experimental Mattermost template for Packer I figured it would be nice to override the message of the day to display the various versions of the software running Mattermost.
On Ubuntu 16.04 a cron job updates the MOTD by calling various scripts inside /etc/update-motd.d. To create a simple custom message I ended up tweaking those scripts a little. The job runs all the scripts in the directory, captures the standard out, and concatenates the output into the MOTD. I ended up removing most of the scripts to clean it up a bit.
I ended up removing the following files
and modifying /etc/update-motd.d/10-help-text to look like the following, which borrows a little from the 00-header file.
The script ends up printing the Mattermost Server version, OS version, MySQL version, and Nginx version when logging into the instance for quick at a glance reference of what version is running. The output looks like the following: