Comment dsa-update-apt-status
UPDATE_RUNS=3
STATUS=/var/cache/dsa/nagios/apt
UPDATE_RUNS=3
STATUS=/var/cache/dsa/nagios/apt
+# sleep if called non-interactively
if [ -z "$TERM" -o "$TERM" = "dumb" ]; then
sleep $(( $RANDOM % 7200 ))
fi
if [ -z "$TERM" -o "$TERM" = "dumb" ]; then
sleep $(( $RANDOM % 7200 ))
fi
+
+# run apt-get update, retry a few times if it fails
count=0
while [ "$count" -lt "$UPDATE_RUNS" ]; do
apt-get update -qq
count=0
while [ "$count" -lt "$UPDATE_RUNS" ]; do
apt-get update -qq
+# run the apt check itself
tmp=`tempfile`
trap "rm -f '$tmp'" exit
/usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp"
tmp=`tempfile`
trap "rm -f '$tmp'" exit
/usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp"