2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

close telnet session

This commit is contained in:
clarkspark 2016-03-22 16:18:28 -04:00
parent 855c31d8ba
commit bc53425e8c

View File

@ -75,7 +75,7 @@ def main():
all_client_connections = secure_client_connections + \
insecure_client_connections
print "all_client_connections.value %s" % (all_client_connections)
telnet.write("quit")
telnet.write("quit\n")
elif wildcard == "s2s":
if mode == "config":
@ -95,7 +95,7 @@ def main():
parsed_info = server_connections_re.findall(telnet_response)
print "outgoing_connections.value %s" % (parsed_info[0][0])
print "incoming_connections.value %s" % (parsed_info[0][1])
telnet.write("quit")
telnet.write("quit\n")
elif wildcard == "presence":
if mode == "config":
@ -121,7 +121,7 @@ def main():
print "away.value %s" % (parsed_info.count("away"))
print "xa.value %s" % (parsed_info.count("xa"))
print "dnd.value %s" % (parsed_info.count("dnd"))
telnet.write("quit")
telnet.write("quit\n")
elif wildcard == "uptime":
if mode == "config":
@ -147,7 +147,7 @@ def main():
uptime_value = float(parsed_info[0]) + float(parsed_info[1])/24 +\
float(parsed_info[2])/60/24
print "uptime.value %s" % (uptime_value)
telnet.write("quit")
telnet.write("quit\n")
elif wildcard == "users":
if mode == "config":