Fix #436 Include listen directive in replacement (#437)

This commit is contained in:
Clark 2023-02-20 02:37:05 +00:00 committed by GitHub
parent 4a64748da8
commit e276700b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,8 @@ class Command(BaseCommand):
return return
regex = re.compile(r"listen [0-9]{1,5}") regex = re.compile(r"listen [0-9]{1,5}")
changed = file_overwrite(NGINX, regex, overwrite) to_overwrite = f"listen {overwrite}"
changed = file_overwrite(NGINX, regex, to_overwrite)
if changed: if changed:
message = f" ✓ TA_PORT changed to {overwrite}" message = f" ✓ TA_PORT changed to {overwrite}"
else: else: