dynamic-motd/update-motd.d/30-need-upgrade
2020-06-30 16:08:20 +02:00

17 lines
426 B
Bash
Executable file

#!/bin/bash
. /etc/update-motd.d/colors
n=$(cat /var/cache/cron-needupgrade)
if [[ $n -gt 0 ]]; then
printf $LIGHT_RED
printf " You have %s packages waiting for upgrades." "$n"
printf $NONE"\n\n"
fi
n=$(cat /var/cache/cron-needautoremove)
if [[ $n -gt 0 ]]; then
printf $YELLOW
printf " You have %s packages that were automatically installed and are not needed anymore." "$n"
printf $NONE"\n\n"
fi