Make motd.sh generic and configurable

This commit is contained in:
Alice Gaudon 2019-12-17 14:42:43 +01:00
parent 95b8819638
commit 3f316732da

View File

@ -7,7 +7,7 @@ echo -e
### Hostname ###
echo -e "$(/usr/bin/env figlet -w $(tput cols) "$(hostname)" | /usr/bin/env lolcat -f -F 0.05 -S 50)"
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
@ -26,7 +26,7 @@ green="\e[1;32m"
red="\e[1;31m"
undim="\e[0m"
services=("docker" "mariadb" "cronie")
services=($(cat /home/arisu/.motd.services))
# sort services
IFS=$'\n' services=($(sort <<<"${services[*]}"))
unset IFS