If no interactive without scripts is not interactive.

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-08-20 10:29:30 +02:00
parent 6368532717
commit 7c5f127f22
+4 -3
View File
@@ -313,7 +313,10 @@ async def run_init_script(app, scripts, interactive):
""" """
if not scripts: if not scripts:
# No script given # No script given
cmd = "/bin/bash" if not interactive:
return
else:
cmd = "/bin/bash"
else: else:
def build_filenames(): def build_filenames():
for filename in scripts: for filename in scripts:
@@ -402,8 +405,6 @@ def server(certfile, keyfile, bind, interactive, scripts):
if bool(certfile) ^ bool(keyfile): if bool(certfile) ^ bool(keyfile):
print("For SSL both 'certfile' and 'keyfile' should be provided.") print("For SSL both 'certfile' and 'keyfile' should be provided.")
sys.exit(1) sys.exit(1)
if not scripts:
interactive = True
loop.run_until_complete(start_kapow_server(bind, scripts, certfile, interactive, keyfile)) loop.run_until_complete(start_kapow_server(bind, scripts, certfile, interactive, keyfile))
loop.run_forever() loop.run_forever()