From a3c756321bc19459cb3dccc3d06d9c7f1eda4ac1 Mon Sep 17 00:00:00 2001 From: Michael Fincham Date: Tue, 11 Jun 2024 19:26:01 +1200 Subject: [PATCH] Improves the accuracy of nginx configuration failure checking --- piku.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piku.py b/piku.py index 205c5ea..613a530 100755 --- a/piku.py +++ b/piku.py @@ -974,7 +974,7 @@ def spawn_app(app, deltas={}): h.write(buffer) # prevent broken config from breaking other deploys try: - nginx_config_test = str(check_output("nginx -t 2>&1 | grep {}".format(app), env=environ, shell=True)) + nginx_config_test = str(check_output("nginx -t 2>&1 | grep -E '{}\.conf:[0-9]+$'".format(app), env=environ, shell=True)) except Exception: nginx_config_test = None if nginx_config_test: