[packages/nagios-alert-jabber] rel 8; -c option for alternate config location
arekm
arekm at pld-linux.org
Thu Mar 13 14:40:25 CET 2014
commit b262787e0354ba6383b038041e67b2d2974eff74
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Mar 13 14:40:22 2014 +0100
rel 8; -c option for alternate config location
nagios-alert-jabber.spec | 2 +-
nagios-jabber.alert | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/nagios-alert-jabber.spec b/nagios-alert-jabber.spec
index 3f23d4f..2e84acb 100644
--- a/nagios-alert-jabber.spec
+++ b/nagios-alert-jabber.spec
@@ -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
diff --git a/nagios-jabber.alert b/nagios-jabber.alert
index 7183f10..0b8c339 100644
--- a/nagios-jabber.alert
+++ b/nagios-jabber.alert
@@ -8,7 +8,7 @@
# luzik at pld-linux.org, 2007-03 - added digest auth method(jabber.gda.pl)
# arekm at 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')})
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-alert-jabber.git/commitdiff/b262787e0354ba6383b038041e67b2d2974eff74
More information about the pld-cvs-commit
mailing list