add update.motd

This commit is contained in:
root
2024-04-16 11:44:31 +02:00
parent 5828342201
commit 28901424ac
8 changed files with 166 additions and 0 deletions

12
update.motd/60-upgrades Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
printf "\n"
number=`apt list --upgradable 2> /dev/null | grep 'upgradable' | wc -l`
printf "Available updates : %s\n" $number
if [ $number -gt 0 ]; then
printf "\033[1;31mSystem needs %s updates\033[0m\n" $number
apt list --upgradable 2> /dev/null | grep 'upgradable'
else
printf "\033[1;32mSystem is uptodate\033[0m\n"
fi
echo