dynamic-motd/cron-scripts/motd-need-reboot
2020-06-30 16:08:20 +02:00

9 lines
258 B
Bash
Executable file

#!/bin/bash
. /etc/update-motd.d/colors
if [[ -x /usr/sbin/needrestart ]]; then
n=$(DEBIAN_FRONTEND=noninteractive echo "" | /usr/sbin/needrestart -k -v -n 2>/dev/null | grep -c "Pending kernel upgrade\!")
cat ${n} > /var/cache/motd-needrestart
fi