Commit 02c0c155 authored by Luc Didry's avatar Luc Didry

Add number of services that need to be restarted

parent 7bae3d50
Pipeline #5187 skipped
#!/bin/bash
. /etc/update-motd.d/colors
if [[ -x /usr/sbin/needrestart ]]; then
n=$(needrestart -l -v -n -r l 2>/dev/null | grep -c "Skipping")
if [[ $n -gt 0 ]]; then
printf $LIGHT_RED
printf " %s services need to be restarted.\n" $n
printf $NONE
printf " Use needrestart to list and restart them.\n\n"
fi
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment