X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fsbin%2Fdsa-update-apt-status;h=a89dbcf65468c70b749ef5e7e9363025fd41e742;hb=2e9d9a03f33cb8aea8d15465def4122e76cc02bd;hp=3e3acefbb627d3839494b1ffe7c54d1a061185d7;hpb=42e99da9d896a33803e763c746e9a103183b6b34;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/sbin/dsa-update-apt-status b/dsa-nagios-checks/sbin/dsa-update-apt-status index 3e3acef..a89dbcf 100755 --- a/dsa-nagios-checks/sbin/dsa-update-apt-status +++ b/dsa-nagios-checks/sbin/dsa-update-apt-status @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash UPDATE_RUNS=3 STATUS=/var/cache/dsa/nagios/apt @@ -29,8 +29,10 @@ run_required() { return $norun } -# do stuff only when required -run_required || exit +# do stuff only when required, or when asked to +if [ "${1:-""}" != "-f" ] ; then + run_required || exit 0 +fi # sleep if called non-interactively if [ -z "$TERM" -o "$TERM" = "dumb" ]; then