From: Michael Howe Date: Mon, 25 Dec 2023 15:42:49 +0000 (+0000) Subject: Fx bash syntax in check_newaliases X-Git-Tag: 0.29.1~1 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0e260004ecc489993a55c10d6c3f4530aeba25ce;p=packages%2Fn%2Fnagios-plugins-local.git Fx bash syntax in check_newaliases --- diff --git a/debian/changelog b/debian/changelog index 02bda5f..cbc872f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nagios-plugins-local (0.29) unstable; urgency=medium + + * Correct bash syntax in check_newaliases + + -- Michael Howe Mon, 25 Dec 2023 15:28:45 +0000 + nagios-plugins-local (0.28) unstable; urgency=medium * Add check_json from https://github.com/RustyDust/check_json/ diff --git a/plugins/check_newaliases b/plugins/check_newaliases index c8396f2..7d6236b 100755 --- a/plugins/check_newaliases +++ b/plugins/check_newaliases @@ -18,7 +18,7 @@ ALIASDB_FILE=${ALIAS_FILE}.db TARGET=$(readlink -f $NEWALIASES) if [ "$TARGET" != "$REQUIRED_TARGET" ]; then - echo "ALIASES OK - Looks like we're not running postfix (newaliases points to ${TARGET})" + echo "ALIASES OK - Not running postfix (newaliases points to ${TARGET})" exit fi @@ -27,8 +27,9 @@ ALIASDB_TS=$(stat --format %Y $ALIASDB_FILE) sec=$((ALIASDB_TS - ALIAS_TS)) -if [ $sec > 0 ]; then +if [ $sec -gt 0 ]; then echo "ALIASES OK - aliases.db is ${sec}s newer than aliases" + exit 0 else echo "ALIASES CRITICAL - aliases.db is ${sec}s older than aliases" exit 2