Make motd.sh global

This commit is contained in:
Alice Gaudon 2020-02-05 01:34:10 +01:00
parent e2f417dc86
commit 15794e13a5

View File

@ -2,20 +2,18 @@
### Time and date ### ### Time and date ###
echo -e "$(date)" echo -e "$(date)"
echo -e echo -e
### Hostname ### ### Hostname ###
echo -e "$(/usr/bin/env figlet -w $(tput cols) "$(hostname)" | /usr/bin/env lolcat -f -F 0.05 -S $(echo $((0x$(hostname | md5sum | cut -c 1-10))) | cut -c 2-5))" echo -e "$(/usr/bin/env figlet -w $(tput cols) "$(hostname)" | /usr/bin/env lolcat -f -F 0.05 -S $(echo $((0x$(hostname | md5sum | cut -c 1-10))) | cut -c 2-5))"
echo -e echo -e
### System info ### ### System info ###
echo -e "`cat /etc/*release | grep "PRETTY_NAME" | cut -d "=" -f 2- | sed 's/"//g'` | Kernel: `uname -r` echo -e "$(cat /etc/*release | grep PRETTY_NAME | cut -d = -f 2- | sed 's/\"//g') | Kernel: $(uname -r)
Uptime: `uptime -p | sed 's/up //'`" Uptime: $(uptime -p | sed 's/up //')"
### Services ### ### Services ###
@ -26,7 +24,7 @@ green="\e[1;32m"
red="\e[1;31m" red="\e[1;31m"
undim="\e[0m" undim="\e[0m"
services=($(cat /home/arisu/.motd.services)) services=($(cat /.motd.services))
# sort services # sort services
IFS=$'\n' services=($(sort <<<"${services[*]}")) IFS=$'\n' services=($(sort <<<"${services[*]}"))
unset IFS unset IFS