Skip to content

Instantly share code, notes, and snippets.

@pablasso
Created September 3, 2011 04:45
Show Gist options
  • Save pablasso/1190578 to your computer and use it in GitHub Desktop.
Save pablasso/1190578 to your computer and use it in GitHub Desktop.
Login script for Ubuntu: /etc/update-motd.d/00-stats
#!/bin/bash
echo " "
echo " ======================================="
echo " = Welcome to KENTAURUS. ="
echo " ======================================="
echo
btime=`who -b | sed -e 's/[^A-Z]*//'`
utime=`uptime | sed -e 's/ [0-9:]* up />/' -e 's/,.*//'`
echo " ==== BOOT TIME ==== ==== UPTIME ===="
echo " "$btime" " $utime
echo
echo "===================== DISK USAGE ======================"
df -h
echo
echo "================== CURRENTLY ONLINE ==================="
echo "NAME LINE TIME IP ADDRESS"
who --ips
echo " "
@pablasso
Copy link
Author

pablasso commented Sep 3, 2011

This script is used with UpdateMotd to modify the message of the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment