From 531a0a086135397bdcbf677276db24e6a1b506b0 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 12 Sep 2017 12:58:43 +0200 Subject: [PATCH] Improve parameter errors handling in Nagios mode --- check_syncrepl_extended | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check_syncrepl_extended b/check_syncrepl_extended index ed30636..af24b7f 100755 --- a/check_syncrepl_extended +++ b/check_syncrepl_extended @@ -150,10 +150,14 @@ parser.add_option( "--replace-touch", if not options.provider or not options.consumer: print "You must provide provider and customer URI" + if options.nagios: + sys.exit(3) sys.exit(1) if not options.basedn: print "You must provide base DN of connection to LDAP servers" + if options.nagios: + sys.exit(3) sys.exit(1) if options.touch and not options.attrs: