add iplist mymotd

This commit is contained in:
Ruben Blanco 2023-11-03 16:10:30 +01:00
parent 10fc166376
commit e8b0270a88
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@ KERNEL=$(uname -r)
PACKAGES=$(dpkg -l | tail -n +6 | wc -l) PACKAGES=$(dpkg -l | tail -n +6 | wc -l)
SHELL=$(dpkg -l | grep bash | head -n 1 | awk '{ print $2 }') SHELL=$(dpkg -l | grep bash | head -n 1 | awk '{ print $2 }')
BASH_VERSION_NUMBER=$(echo $BASH_VERSION | cut -c -6) BASH_VERSION_NUMBER=$(echo $BASH_VERSION | cut -c -6)
IP_LIST=$(for i in $(ip a | grep inet | grep -v "::" | awk {'print $2'}); do echo -e "ip -> $i"; done)
source /etc/os-release source /etc/os-release
echo -e "****************************************************************************" echo -e "****************************************************************************"
echo -e "${WHITE} _${RESET}" echo -e "${WHITE} _${RESET}"
@ -24,6 +25,7 @@ echo -e "${WHITE} \_/ \____)_| \____|${RESET}${GREEN}|_| |_|\_||_|\___)____|_
echo -e "" echo -e ""
echo -e "${RED}Host:${RESET} $HOSTNAME" echo -e "${RED}Host:${RESET} $HOSTNAME"
echo -e "${RED}OS:${RESET} $PRETTY_NAME" echo -e "${RED}OS:${RESET} $PRETTY_NAME"
echo -e "${RED}IP:${RESET}\n$IP_LIST"
echo -e "${RED}Kernel:${RESET} $KERNEL" echo -e "${RED}Kernel:${RESET} $KERNEL"
echo -e "${RED}Packages:${RESET} $PACKAGES" echo -e "${RED}Packages:${RESET} $PACKAGES"
echo -e "${RED}Shell:${RESET} $SHELL $BASH_VERSION_NUMBER" echo -e "${RED}Shell:${RESET} $SHELL $BASH_VERSION_NUMBER"