Implement the backend for automatically provisioning relays

This commit is contained in:
2019-01-26 01:57:24 +00:00
parent 6046329a83
commit 4efea3f535
15 changed files with 356 additions and 160 deletions

View File

@@ -12,10 +12,10 @@ class Relay:
if spl[2] in main.relay.keys():
failure("Relay already exists: %s" % spl[2])
return
if not spl[4].isdigit():
failure("Port must be an integer, not %s" % spl[4])
return
else:
if not spl[4].isdigit():
failure("Port must be an integer, not %s" % spl[4])
return
main.relay[spl[2]] = {"host": spl[3],
"port": spl[4],
"user": spl[5],