#!/bin/sh # # Plugin to monitor the number of CVE vulnerabilities present on a Debian # system (using debsecan). Might work on other distib, who knows... # # Inspiration of the moment 10/10/2007 # # Nicolas BOUTHORS http://nbi.fr/ # # Licence : Public Domain # #%# family=auto #%# capabilities=autoconf # Auto enable if we have debsecan only if [ "$1" = "autoconf" ] ; then if [ -x /usr/bin/debsecan ]; then echo yes else echo no fi exit 0 fi # Fail if we don't have debsecan if [ ! -x /usr/bin/debsecan ]; then exit 1 fi if [ "$1" = "config" ] ; then cat < /dev/null > ${OUT} grep 'high urgency' ${OUT} > ${HIGH} grep 'medium urgency' ${OUT} > ${MEDIUM} grep 'low urgency)' ${OUT} > ${LOW} grep -v '\(low\|medium\|high\) urgency' ${OUT} > ${OTHER} high=`cat ${HIGH} | wc -l` medium=`cat ${MEDIUM} | wc -l` low=`cat ${LOW} | wc -l` other=`cat ${OTHER} | wc -l` cat <