From e3ba73a6075a1f1839fca7e7c8c05b1da8c8015f Mon Sep 17 00:00:00 2001 From: Anton Afanasyeu Date: Sat, 4 Jul 2026 11:30:14 +0200 Subject: [PATCH] fix configure-nginx: skip same-file install (script runs from git repo path) Co-authored-by: Cursor --- sim/cluster0/scripts/configure-nginx.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sim/cluster0/scripts/configure-nginx.sh b/sim/cluster0/scripts/configure-nginx.sh index 4fc2558..66f43e0 100644 --- a/sim/cluster0/scripts/configure-nginx.sh +++ b/sim/cluster0/scripts/configure-nginx.sh @@ -8,10 +8,11 @@ ensure_shared_mounted # Prefer the git repo nginx template over the shared cluster copy (keeps nginx config up to date # with submodule commits). Falls back to the shared copy if git repo unavailable. GIT_NGINX="/mnt/repos/ac/ac-deploy/sim/cluster0/nginx/apps-port80.conf" -if [ -f "$GIT_NGINX" ]; then - install -D -m 644 "$GIT_NGINX" "$ROOT/nginx/apps-port80.conf" +CONF_DST="$ROOT/nginx/apps-port80.conf" +if [ -f "$GIT_NGINX" ] && [ "$(realpath "$GIT_NGINX" 2>/dev/null)" != "$(realpath "$CONF_DST" 2>/dev/null)" ]; then + install -D -m 644 "$GIT_NGINX" "$CONF_DST" fi -install -D -m 644 "$ROOT/nginx/apps-port80.conf" /etc/nginx/http.d/androidcast.conf +install -D -m 644 "$CONF_DST" /etc/nginx/http.d/androidcast.conf rm -f /etc/nginx/http.d/default.conf /etc/nginx/http.d/cluster.conf 2>/dev/null || true nginx -t rc-service nginx reload