Cheat Sheets

Security - Pending Updates

Description

There should be no pending updates. This check uses apt-show-versions which needs to be installed.

Check Script: security-pending-updates2.sh

#!/bin/bash

pkgs=$( apt-show-versions 2>/dev/null |\ grep ' upgradeable to ' |\ awk '{package=$1; gsub(/:.*/, "", package); print package "=" $5}' ) if [ "$pkgs" != "" ]; then result_warning "Security upgrades pending:" $pkgs else result_ok fi
Comment on Disqus