Last active
August 28, 2022 03:00
-
-
Save t94xr/3352ff1d1556d37ad6ee25ecfa680c0c to your computer and use it in GitHub Desktop.
Login Script
This file contains hidden or 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/bash | |
# Save this as /etc/profile.d/login.sh | |
# chmod +x login.sh | |
echo -e "" | |
echo -e "\e[1m$(cat /etc/hostname)\e[0m" "has been" "\e[32m$(uptime -p)\e[0m" "(since" "$(last reboot | grep still | awk '{print $5 " " $6 " " $7 " " $8}')"")" | |
echo -e "Local IP: " "$(ip addr | awk '/state UP/ {print $2}' | sed 's/.$//')" "$(hostname -I | awk '{print $1}')" | |
echo -e "WAN IP: " "$(dig @resolver4.opendns.com myip.opendns.com +short)" | |
echo -e "" | |
echo -e "$(inxi -s | grep cpu)" | |
echo -e "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment