+nagios-plugins-local (0.29) unstable; urgency=medium
+
+ * Correct bash syntax in check_newaliases
+
+ -- Michael Howe <michael@michaelhowe.org> 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/
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
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