Add shutdown to CLI
This commit is contained in:
parent
b7f808cde1
commit
18119339f8
|
@ -12,6 +12,7 @@ import getopt
|
||||||
import imghdr
|
import imghdr
|
||||||
import ntpath
|
import ntpath
|
||||||
import json
|
import json
|
||||||
|
import socket
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -1283,6 +1284,13 @@ def clientStatus():
|
||||||
print "\nnumberOfMessagesProcessed: " + str(clientStatus['numberOfMessagesProcessed']) + "\n"
|
print "\nnumberOfMessagesProcessed: " + str(clientStatus['numberOfMessagesProcessed']) + "\n"
|
||||||
print "\nnumberOfBroadcastsProcessed: " + str(clientStatus['numberOfBroadcastsProcessed']) + "\n"
|
print "\nnumberOfBroadcastsProcessed: " + str(clientStatus['numberOfBroadcastsProcessed']) + "\n"
|
||||||
|
|
||||||
|
def shutdown():
|
||||||
|
try:
|
||||||
|
api.shutdown()
|
||||||
|
except socket.error:
|
||||||
|
pass
|
||||||
|
print "\nShutdown command relayed\n"
|
||||||
|
|
||||||
|
|
||||||
def UI(usrInput): #Main user menu
|
def UI(usrInput): #Main user menu
|
||||||
global usrPrompt
|
global usrPrompt
|
||||||
|
@ -1705,6 +1713,11 @@ def UI(usrInput): #Main user menu
|
||||||
usrPrompt = 1
|
usrPrompt = 1
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
elif usrInput == "shutdown":
|
||||||
|
shutdown()
|
||||||
|
usrPrompt = 1
|
||||||
|
main()
|
||||||
|
|
||||||
elif usrInput == "million+":
|
elif usrInput == "million+":
|
||||||
genMilAddr()
|
genMilAddr()
|
||||||
usrPrompt = 1
|
usrPrompt = 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user