Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/charleszlu/murmur-info.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatenom <natenom@natenom.name>2012-09-06 11:02:00 +0400
committerNatenom <natenom@natenom.name>2012-09-06 11:06:00 +0400
commit73c444ba540dc25ce8d24af63468fa595a7536f4 (patch)
tree34ce67bbce996003cb11dd5008d0c39c3c5a36ba
parentd8cfa1f97fc3b87b5a2cd1411671eac298d1d482 (diff)
murmur-munin.py - Support for icesecretread
-rw-r--r--.gitignore1
-rw-r--r--murmur-munin.py14
2 files changed, 14 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b25c15b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*~
diff --git a/murmur-munin.py b/murmur-munin.py
index 702966c..62df9aa 100644
--- a/murmur-munin.py
+++ b/murmur-munin.py
@@ -13,6 +13,11 @@ serverport=64738
#Port where ice listen
iceport=6502
+#Ice Password to get read access.
+#If there is no such var in your murmur.ini, this can have any value.
+#You can also use the icesecretwrite of your server.
+icesecretread="secureme"
+
#MessageSizeMax; increase this value, if you get a MemoryLimitException.
# Also check this value in murmur.ini of your Mumble-Server.
# This value is being interpreted in kibiBytes.
@@ -23,10 +28,12 @@ Ice.loadSlice("--all -I/usr/share/Ice/slice %s" % iceslice)
props = Ice.createProperties([])
props.setProperty("Ice.MessageSizeMax", str(messagesizemax))
+props.setProperty("Ice.ImplicitContext", "Shared")
id = Ice.InitializationData()
id.properties = props
ice = Ice.initialize(id)
+ice.getImplicitContext().put("secret", icesecretread)
import Murmur
@@ -43,7 +50,12 @@ if (sys.argv[1:]):
meta = Murmur.MetaPrx.checkedCast(ice.stringToProxy("Meta:tcp -h 127.0.0.1 -p %s" % (iceport)))
-server=meta.getServer(1)
+try:
+ server=meta.getServer(1)
+except Murmur.InvalidSecretException:
+ print 'Given icesecreatread password is wrong.'
+ ice.shutdown()
+ sys.exit(1)
#count users
usersnotauth=0