From 3b3de281f67c954a53c25c283f92f3ba84169db6 Mon Sep 17 00:00:00 2001 From: amir-climy Date: Tue, 19 May 2026 19:45:00 +0800 Subject: [PATCH] feat(install): add --port flag to set web UI host port at install time Passes --port PORT through to TRITON_MANAGE_HOST_PORT in .env so users can change the default 8082 at install time via the one-liner: curl ... | sudo bash -s -- --port 9090 Co-Authored-By: Claude Sonnet 4.6 --- README.md | 1 + manage-server/install.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 3350bd1..3b6a132 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ curl -fsSL https://raw.githubusercontent.com/primatekuntech/triton-install/main/ |------|-------------| | `--gateway-hostname HOST` | Agent mTLS hostname (defaults to current FQDN). | | `--manage-host-ip IP` | Host LAN IP for "+ This machine" auto-registration. | +| `--port PORT` | Host port for the web UI (default: `8082`). | | `--image TAG` | Pin a specific image tag (e.g. `1.0.0-rc.2`). | | `--no-tls` | Skip TLS sanity check (dev only). | diff --git a/manage-server/install.sh b/manage-server/install.sh index b954695..2609dca 100755 --- a/manage-server/install.sh +++ b/manage-server/install.sh @@ -10,6 +10,7 @@ # Flags (all optional): # --gateway-hostname HOST Agent mTLS hostname (defaults to current FQDN). # --manage-host-ip IP Host LAN IP — used for "+ This machine". +# --port PORT Host port for the web UI (default: 8082). # --image TAG Pin a specific manage-server image tag. # --no-tls Skip the TLS-required sanity check (dev). set -euo pipefail @@ -23,12 +24,14 @@ die() { printf '[manage-server] error: %s\n' "$*" >&2; exit 1; } # ── arg parsing ────────────────────────────────────────────────────────── GATEWAY_HOST="" HOST_IP="" +PORT="" IMAGE="" NO_TLS=0 while [[ $# -gt 0 ]]; do case "$1" in --gateway-hostname) GATEWAY_HOST="$2"; shift 2 ;; --manage-host-ip) HOST_IP="$2"; shift 2 ;; + --port) PORT="$2"; shift 2 ;; --image) IMAGE="$2"; shift 2 ;; --no-tls) NO_TLS=1; shift ;; -h|--help) grep '^#' "$0" | sed 's/^# //;s/^#//'; exit 0 ;; @@ -75,6 +78,7 @@ if [[ ! -f "$ENV_FILE" ]]; then [[ -n "$GATEWAY_HOST" ]] && sed -i "s|^TRITON_MANAGE_GATEWAY_HOSTNAME=.*|TRITON_MANAGE_GATEWAY_HOSTNAME=$GATEWAY_HOST|" "$ENV_FILE" [[ -n "$HOST_IP" ]] && sed -i "s|^TRITON_MANAGE_HOST_IP=.*|TRITON_MANAGE_HOST_IP=$HOST_IP|" "$ENV_FILE" + [[ -n "$PORT" ]] && sed -i "s|^TRITON_MANAGE_HOST_PORT=.*|TRITON_MANAGE_HOST_PORT=$PORT|" "$ENV_FILE" [[ -n "$IMAGE" ]] && sed -i "s|^TRITON_MANAGE_IMAGE=.*|TRITON_MANAGE_IMAGE=$IMAGE|" "$ENV_FILE" info ".env created at $ENV_FILE"