Cheat Sheets

Security - Pending Restarts

Description

There should be no pending service restarts after library upgrades. This is checked using the needstart tool which needs to be installed (Available starting with Jessie/Wheezy Backports).

Check Script: security-pending-restarts.sh

#!/bin/bash

services=$(/usr/sbin/needrestart -b -r l 2>/dev/null) if [ "$services" != "" ]; then result_warning "Services requiring restart: $services" else result_ok fi
Comment on Disqus