if [ -d /run/systemd/system ]; then
if service dbus status >/dev/null 2>&1; then
# trigger an update notification which recommends to reboot
[ -x /usr/share/update-notifier/notify-reboot-required ] && \
/usr/share/update-notifier/notify-reboot-required || true
fi
else
PID=$(status "dbus" 2>/dev/null | awk '/[0-9]$/ { print $NF }')
if [ -n "$PID" ]; then
# trigger an update notification which recommends to reboot
[ -x /usr/share/update-notifier/notify-reboot-required ] && \
/usr/share/update-notifier/notify-reboot-required || true
fi
fi