Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created May 15, 2014 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ableasdale/43376ab1d7fce83cc48d to your computer and use it in GitHub Desktop.
Save ableasdale/43376ab1d7fce83cc48d to your computer and use it in GitHub Desktop.
Virtual Machine ssh login status page
#!/bin/bash
IP_ADDR=$(/sbin/ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}')
echo -e "\033[1;32m
____ _ ___ ____ __ ____ __
/ ___|___ _ __ | |_ / _ \/ ___| \ \ / / \/ |
| | / _ \ '_ \| __| | | | \___ \ \ \ / /| |\/| |
| |__| __/ | | | |_ | |_| |___) | \ V / | | | |
\____\___|_| |_|\__| \___/|____/ \_/ |_| |_|
\033[0;35m+++++++++++++++++: \033[0;37mSystem Data\033[0;35m :+++++++++++++++++++
+ \033[0;37mHostname \033[0;35m= \033[1;32m`hostname`
\033[0;35m+ \033[0;37mAddress \033[0;35m= \033[1;32m$IP_ADDR
\033[0;35m+ \033[0;37mKernel \033[0;35m= \033[1;32m`uname -r`
\033[0;35m+ \033[0;37mUptime \033[0;35m=\033[1;32m`uptime | sed 's/.*up ([^,]*), .*/1/'`
\033[0;35m+ \033[0;37mCPU \033[0;35m= \033[1;32mVirtualBox VM Image (No dedicated CPUs)
\033[0;35m+ \033[0;37mMemory \033[0;35m= \033[1;32m`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` kB
\033[0;35m++++++++++++++++++: \033[0;37mUser Data\033[0;35m :++++++++++++++++++++
+ \033[0;37mUsername \033[0;35m= \033[1;32m`whoami`
\033[0;35m+ \033[0;37mSessions \033[0;35m= \033[1;32m`who | grep $USER | wc -l`
\033[0;35m+++++++++++: \033[0;31mMaintenance Information\033[0;35m :+++++++++++++
+\033[0;31m `cat /etc/motd-maint`
\033[0;35m+++++++++++++++++++++++++++++++++++++++++++++++++++
\033[0;37m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment