add start to dynmotd

This commit is contained in:
Louis Abel 2023-04-18 16:35:29 -07:00
parent 613a6029fe
commit 507b0a35ae
Signed by: label
GPG Key ID: 6735C0E1BD65D048

34
files/etc/motd Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
BLUE=$(tput setaf 4)
MAGENTA=$(tput setaf 5)
CYAN=$(tput setaf 6)
WHITE=$(tput setaf 7)
RESET=$(tput sgr0)
BOLD=$(tput bold)
uptime=`cat /proc/uptime | cut -f1 -d.`
upDays=$((uptime/60/60/24))
upHours=$((uptime/60/60%24))
upMins=$((uptime/60%60))
upSecs=$((uptime%60))
echo -e "${GREEN}
.:^~~~~^:. ${RESET}$(hostname)${GREEN}
.^!?JJJJJJJJJJ?!^. -------------------------------------------------
~?JJJJJJJJJJJJJJJJ?~ ${RESET}$(cat /etc/redhat-release)${GREEN}
:?JJJJJJJJJJJJJJJJJJJJ?: ${RESET}Uptime: ${BOLD}$upDays days $upHours hours $upMins minutes $upSecs seconds${GREEN}
.?JJJJJJJJJJJJJJ7?JJJJJJ?.
!JJJJJJJJJJJJJ7: ^?JJJJJ!
7JJJJJJJJJJJ!: ^7JJJ7
!JJJJJJJJJ!. :. :7J!
.?JJJJJ?~. :7JJ!. :.
:?JJ?~. ^7JJJJJJ!:
.~~ ^?JJJJJJJJY?:
^?YYJJJJJJ?!^.
.:^~~~~^:.
${RESET}
"