diff --git a/nagixsc_conf2xml.py b/nagixsc_conf2xml.py
index 508f0d0e8196e074940e4ea0c1e58240cfc50b72..153c910914b86da2b08849acfe15c7122578e1da 100755 (executable)
--- a/nagixsc_conf2xml.py
+++ b/nagixsc_conf2xml.py
parser.add_option('-D', '', dest='service', help='Service description to search for in config file (needs -H)')
parser.add_option('-l', '', dest='httpuser', help='HTTP user name, if outfile is HTTP(S) URL')
parser.add_option('-a', '', dest='httppasswd', help='HTTP password, if outfile is HTTP(S) URL')
+parser.add_option('-q', '', action='store_true', dest='quiet', help='Be quiet')
parser.add_option('-v', '', action='count', dest='verb', help='Verbose output')
parser.set_defaults(conffile='nagixsc.conf')
xmldoc = xml_from_dict(checks, options.encoding)
# Output
-write_xml(xmldoc, options.outfile, options.httpuser, options.httppasswd)
+response = write_xml_or_die(xmldoc, options.outfile, options.httpuser, options.httppasswd)
+if response and not options.quiet:
+ print response