Browse Source

add "autoconf" command

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
04e31240e6
  1. 7
      munin.py

7
munin.py

@ -1,4 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
# -*- coding: utf-8 -*-
""" """
* Copyright (C) 2009, Michael "Svedrin" Ziegler <diese-addy@funzt-halt.net> * Copyright (C) 2009, Michael "Svedrin" Ziegler <diese-addy@funzt-halt.net>
@ -50,6 +51,12 @@ if sys.argv[-1] == 'config':
for mumble in mm: for mumble in mm:
print "%d.label %s" % ( mumble.id, mumble.name ); print "%d.label %s" % ( mumble.id, mumble.name );
elif sys.argv[-1] == 'autoconf':
if len(mm) == 0:
print "no (no servers configured)";
else:
print "yes";
else: else:
for mumble in mm: for mumble in mm:
print "%d.value %d" % ( mumble.id, len( mumble.ctl.getPlayers( mumble.srvid ) ) ); print "%d.value %d" % ( mumble.id, len( mumble.ctl.getPlayers( mumble.srvid ) ) );

Loading…
Cancel
Save