Last active
January 14, 2017 02:03
-
-
Save laraconda/d0ce8670d0648b1a3b494a91679330da to your computer and use it in GitHub Desktop.
Installs necessary software and creates files in order to be able to use a dynamic MOTD.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# setup_motd - Create necesary files to display a dynamic MOTD | |
sudo apt-get install figlet | |
motdd_location=/etc/update-motd.d | |
sudo mkdir -p $motdd_location | |
default_motd_location=/etc/motd | |
if [ -f $default_motd_location ]; then | |
sudo rm $default_motd_location | |
fi | |
cd $motdd_location | |
sudo wget --no-clobber https://gist.githubusercontent.com/LaraChicharo/65cd1fbad0f4f53cc4d4ed8c96066dde/raw/9c1c58f30675debb6752d984fb28b8b1960faeee/00-head | |
sudo wget --no-clobber https://gist.githubusercontent.com/LaraChicharo/65cd1fbad0f4f53cc4d4ed8c96066dde/raw/9c1c58f30675debb6752d984fb28b8b1960faeee/99-footer | |
sudo chmod +x $motdd_location/* | |
sudo ln -s /var/run/motd $default_motd_location |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment