aboutsummaryrefslogtreecommitdiff
path: root/nagios-acknowledge
diff options
context:
space:
mode:
Diffstat (limited to 'nagios-acknowledge')
-rwxr-xr-xnagios-acknowledge7
1 files changed, 7 insertions, 0 deletions
diff --git a/nagios-acknowledge b/nagios-acknowledge
index c25deac..5fc6703 100755
--- a/nagios-acknowledge
+++ b/nagios-acknowledge
@@ -87,6 +87,13 @@ case $spec in
;;
esac
+# There must be at least one object
+if ! ((${#objects[@]})) ; then
+ printf '%s: At least one host/service must be given\n' \
+ "$self" >&2
+ exit 1
+fi
+
# All the hosts or services must exist, just to be strict; they don't
# necessarily have to be in a PROBLEM state though
for object in "${objects[@]}" ; do