mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 10:28:36 +00:00
[debsecan] Use temp filename rather than PID-derived
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
d0a837056f
commit
87f5a74ec8
1 changed files with 7 additions and 6 deletions
|
@ -59,11 +59,12 @@ EOF_
|
|||
exit 0
|
||||
fi
|
||||
|
||||
debsecan 2> /dev/null > /tmp/debsecan.munin.$$
|
||||
high=`grep -c 'high urgency' /tmp/debsecan.munin.$$`
|
||||
medium=`grep -c 'medium urgency' /tmp/debsecan.munin.$$`
|
||||
low=`grep -c 'low urgency)' /tmp/debsecan.munin.$$`
|
||||
other=`grep -c -v -e 'low urgency' -e 'medium urgency' -e 'high urgency' /tmp/debsecan.munin.$$`
|
||||
OUT=`mktemp -t debescan.XXXXXX`
|
||||
debsecan 2> /dev/null > ${OUT}
|
||||
high=`grep -c 'high urgency' ${OUT}`
|
||||
medium=`grep -c 'medium urgency' ${OUT}`
|
||||
low=`grep -c 'low urgency)' ${OUT}`
|
||||
other=`grep -c -v -e 'low urgency' -e 'medium urgency' -e 'high urgency' ${OUT}`
|
||||
cat <<EOF_
|
||||
high.value $high
|
||||
medium.value $medium
|
||||
|
@ -71,4 +72,4 @@ low.value $low
|
|||
other.value $other
|
||||
EOF_
|
||||
|
||||
rm -f /tmp/debsecan.munin.$$
|
||||
rm -f ${OUT}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue