From c1158e993834d0f8b0911122b967e5e6d4ceff63 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 May 2026 06:58:26 +0000 Subject: [PATCH] chore: sync installers from triton v1.0.0-rc.2 --- manage-server/env.template | 4 ++-- manage-server/install.sh | 2 +- manage-server/uninstall.sh | 16 +++++++--------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/manage-server/env.template b/manage-server/env.template index ce1e011..f88f8a4 100644 --- a/manage-server/env.template +++ b/manage-server/env.template @@ -54,5 +54,5 @@ TLS_CERT_HOST_DIR=/etc/triton/tls # ─── Sessions ──────────────────────────────────────────────────────────── TRITON_MANAGE_SESSION_TTL=24h -# ─── Image (override only — default is set in compose.yaml) ────────────── -# TRITON_MANAGE_IMAGE=ghcr.io/primatekuntech/triton-manageserver:latest +# ─── Image ─────────────────────────────────────────────────────────────── +TRITON_MANAGE_IMAGE=ghcr.io/primatekuntech/triton-manage-server:latest diff --git a/manage-server/install.sh b/manage-server/install.sh index 7d87287..7f66d9e 100755 --- a/manage-server/install.sh +++ b/manage-server/install.sh @@ -75,7 +75,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 "$IMAGE" ]] && printf '\nTRITON_MANAGE_IMAGE=%s\n' "$IMAGE" >> "$ENV_FILE" + [[ -n "$IMAGE" ]] && sed -i "s|^TRITON_MANAGE_IMAGE=.*|TRITON_MANAGE_IMAGE=$IMAGE|" "$ENV_FILE" info ".env created at $ENV_FILE" info " back this up — it contains the JWT signing key, worker key, and vault key" diff --git a/manage-server/uninstall.sh b/manage-server/uninstall.sh index 77e563c..52d87af 100755 --- a/manage-server/uninstall.sh +++ b/manage-server/uninstall.sh @@ -1,13 +1,12 @@ #!/usr/bin/env bash # uninstall.sh — stop and remove Manage Server containers. # -# By default, KEEPS the PostgreSQL volume (scan history, hosts, users) -# and the installer directory (preserves .env secrets for reinstall). -# Pass --purge-data to delete volumes + installer directory — irreversible. +# By default, KEEPS the PostgreSQL volume (scan history, hosts, users). +# Pass --purge-data to delete the volumes as well — irreversible. # # Usage: -# sudo bash uninstall.sh # stop + remove containers, keep DB + .env -# sudo bash uninstall.sh --purge-data # also delete DB, volumes, and /opt/triton-manage-server +# sudo bash uninstall.sh # stop + remove containers, keep DB +# sudo bash uninstall.sh --purge-data # also delete DB + binaries volume set -euo pipefail SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" @@ -43,18 +42,17 @@ fi if [[ $PURGE -eq 1 ]]; then info "DESTRUCTIVE: removing manage server volumes..." info " this deletes: scan history, hosts, users, worker binaries" + read -r -p " Are you sure? Type 'yes' to confirm: " CONFIRM + [[ "$CONFIRM" == "yes" ]] || die "aborted" for vol in triton-manage-db-data triton-manage-bins; do podman volume rm -f "$vol" 2>/dev/null \ || docker volume rm -f "$vol" 2>/dev/null \ || true done info " volumes removed" - info " removing installer directory $SCRIPT_DIR..." - rm -rf "$SCRIPT_DIR" - info " installer directory removed" + info " .env still on disk at $SCRIPT_DIR/.env — delete manually if desired" else info "DB + bins volumes retained (run with --purge-data to delete)" - info ".env preserved at $SCRIPT_DIR/.env — secrets reused on reinstall" fi info "uninstall complete"