mirror of
https://github.com/cmur2/munin-mumble.git
synced 2024-11-18 12:56:18 +01:00
murmur-munin.py - Support for icesecretread
This commit is contained in:
parent
d8cfa1f97f
commit
73c444ba54
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*~
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user