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
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ class Command(BaseCommand):
return
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:
message = f" ✓ TA_PORT changed to {overwrite}"
else: