]> git.pld-linux.org Git - packages/nagios-alert-jabber.git/commitdiff
rel 8; -c option for alternate config location auto/th/nagios-alert-jabber-1.2-9
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 13 Mar 2014 13:40:22 +0000 (14:40 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 13 Mar 2014 13:40:22 +0000 (14:40 +0100)
nagios-alert-jabber.spec
nagios-jabber.alert

index 3f23d4f283c5d94d3517a3d123f36d5bd703b154..2e84acb5d1674383fec899e6facc09bc8c6a3f25 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Program to send (Nagios) alerts via jabber
 Summary(pl.UTF-8):     Program do wysyłania alarmów (Nagiosa) przez jabbera
 Name:          nagios-alert-jabber
 Version:       1.2
-Release:       8
+Release:       9
 License:       GPL
 Group:         Networking
 Source0:       nagios-jabber.alert
index 7183f10c81ef6818a9336a6bbcfe4d591cd085ff..0b8c33913e41ff188cf486c013bdb7e514986f05 100644 (file)
@@ -8,7 +8,7 @@
 # luzik@pld-linux.org, 2007-03 - added digest auth method(jabber.gda.pl)
 # arekm@pld-linux.org, 2009-07 - added fallback accounts support
 # usage:
-#   jabber.alert [-x] [-a account_id][,otheraccount_id] [-t timeout ] [-J from_jid -P password] to_jid1 to_jid2 to_jid3
+#   jabber.alert [-x] [-c config] [-a account_id][,otheraccount_id] [-t timeout ] [-J from_jid -P password] to_jid1 to_jid2 to_jid3
 
 import os
 import hashlib
@@ -27,7 +27,7 @@ from pyxmpp.jabber.client import JabberClient
 from pyxmpp.streamtls import TLSSettings
 
 try:
-       opts, args = getopt.getopt(sys.argv[1:], "J:P:a:dt:x")
+       opts, args = getopt.getopt(sys.argv[1:], "J:P:a:c:dt:x")
 except getopt.GetoptError, e:
        print >> sys.stderr, "%s: %s " % (sys.argv[0], e)
        sys.exit(1)
@@ -36,7 +36,7 @@ jids = []
 html = False
 debug = False
 timeout = 20
-
+cfg = "/etc/nagios/jabber-notify.ini"
 tjid = None
 for o, a in opts:
        if o == '-d':
@@ -53,7 +53,7 @@ for o, a in opts:
                import ConfigParser
 
                config = ConfigParser.ConfigParser()
-               config.read('/etc/nagios/jabber-notify.ini')
+               config.read(cfg)
 
                for section in a.split(','):
                        jids.append({ 'jid': config.get(section, 'jid'), 'password': config.get(section, 'password')})
This page took 0.121618 seconds and 4 git commands to generate.