Commit fe46dcc1 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

handle shutdown command in bob


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@569 e5f2f494-b856-4b98-b285-d166d9295462
parent 989d0d71
......@@ -98,7 +98,16 @@ class BoB:
if self.verbose:
print("[XX] Boss got command:")
print(command)
return None
answer = None
if "command" in command:
cmd = command["command"]
if cmd == "shutdown":
self.shutdown()
else:
answer = { "result": [ 1, "unknown command: " + cmd ] }
else:
answer = { "result": [ 1, "bad command" ] }
return answer
def startup(self):
"""Start the BoB instance.
......
......@@ -19,6 +19,11 @@
"item_optional": False,
"item_default": ""
} ]
},
{
"command_name": "shutdown",
"command_description": "Shut down BIND 10",
"command_args": []
}
]
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment