mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 03:17:55 +03:00
Bind Gitea on all interfaces for cast02/03 proxy, fix stale 2FA lab-seed approve flow, add /v0/downloads/ and GITEA_UPSTREAM_HOST, and guard nginx configure against empty templates. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
994 B
Bash
25 lines
994 B
Bash
#!/bin/sh
|
|
set -eu
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
# shellcheck source=/dev/null
|
|
. "$ROOT/scripts/lib/common.sh"
|
|
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"
|
|
CONF_DST="$ROOT/nginx/apps-port80.conf"
|
|
if [ -f "$GIT_NGINX" ] && [ "$(realpath "$GIT_NGINX" 2>/dev/null)" != "$(realpath "$CONF_DST" 2>/dev/null)" ]; then
|
|
if [ -s "$GIT_NGINX" ]; then
|
|
install -D -m 644 "$GIT_NGINX" "$CONF_DST"
|
|
else
|
|
log "WARN: skip empty GIT_NGINX at $GIT_NGINX"
|
|
fi
|
|
fi
|
|
[ -s "$CONF_DST" ] || die "missing or empty nginx template at $CONF_DST"
|
|
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
|
|
log "nginx androidcast vhost installed"
|