mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
Fix reverse scan python script
This commit is contained in:
parent
1ff2aed68c
commit
99b30af8ea
1 changed files with 10 additions and 12 deletions
|
@ -7,14 +7,11 @@ from traceback import format_exc
|
|||
from uvicorn import run
|
||||
|
||||
|
||||
fastapi_proc = None
|
||||
if getenv("TEST_TYPE", "docker") == "docker":
|
||||
app = FastAPI()
|
||||
fastapi_proc = Process(
|
||||
target=run,
|
||||
args=(app,),
|
||||
kwargs=dict(
|
||||
host="0.0.0.0" if getenv("TEST_TYPE", "docker") == "docker" else "127.0.0.1",
|
||||
port=80,
|
||||
),
|
||||
target=run, args=(app,), kwargs=dict(host="0.0.0.0", port=80)
|
||||
)
|
||||
fastapi_proc.start()
|
||||
|
||||
|
@ -47,4 +44,5 @@ except:
|
|||
print(f"❌ Something went wrong, exiting ...\n{format_exc()}", flush=True)
|
||||
exit(1)
|
||||
finally:
|
||||
if fastapi_proc:
|
||||
fastapi_proc.terminate()
|
||||
|
|
Loading…
Reference in a new issue