This commit is contained in:
voltron committed 2026-08-12 20:51:32 -05:00
1 parent c0bbfb3447
commit ecb981c8a7
4 files changed
+127 -5

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@ VE environments.
Run as `root` on a Proxmox VE host: Run as `root` on a Proxmox VE host:
```bash ```bash
bash <(curl -fsSL https://go.scity.us/install-tapm) bash <(curl -fsSL https://tagit.technologyarch.com/TAI/TA-ProxMenu/raw/branch/V2/install-ta_proxmenu.sh)
``` ```
The installed launcher loads TA-ProxMenu's bundled defaults and colors, then The installed launcher loads TA-ProxMenu's bundled defaults and colors, then
@@ -104,7 +104,7 @@ Pulse can also be deployed without installing TA-ProxMenu. Run the standalone
bootstrap as root on a Proxmox VE host: bootstrap as root on a Proxmox VE host:
```bash ```bash
bash <(curl -fsSL https://tagit.technologyarch.com/taiadmin/TA-ProxMenu/raw/branch/V2/install-pulse.sh) bash <(curl -fsSL https://tagit.technologyarch.com/TAI/TA-ProxMenu/raw/branch/V2/install-pulse.sh)
``` ```
The bootstrap downloads the Pulse deployment module and its LXC storage helper The bootstrap downloads the Pulse deployment module and its LXC storage helper
+1 -1
View File
@@ -4,7 +4,7 @@
set -u -o pipefail set -u -o pipefail
TAPM_PULSE_SOURCE_BRANCH="${TAPM_PULSE_SOURCE_BRANCH:-V2}" TAPM_PULSE_SOURCE_BRANCH="${TAPM_PULSE_SOURCE_BRANCH:-V2}"
TAPM_PULSE_SOURCE_BASE="${TAPM_PULSE_SOURCE_BASE:-https://tagit.technologyarch.com/taiadmin/TA-ProxMenu/raw/branch/${TAPM_PULSE_SOURCE_BRANCH}}" TAPM_PULSE_SOURCE_BASE="${TAPM_PULSE_SOURCE_BASE:-https://tagit.technologyarch.com/TAI/TA-ProxMenu/raw/branch/${TAPM_PULSE_SOURCE_BRANCH}}"
TAPM_PULSE_BOOTSTRAP_DIR='' TAPM_PULSE_BOOTSTRAP_DIR=''
TAPM_TEMP_DIR='' TAPM_TEMP_DIR=''
declare -a TAPM_TEMP_DIRS=() declare -a TAPM_TEMP_DIRS=()
+122
View File
@@ -0,0 +1,122 @@
#!/usr/bin/env bash
# Install TA-ProxMenu on a Proxmox VE host.
set -Eeuo pipefail
readonly INSTALL_ROOT='/opt/idssys'
readonly TAPM_DIR="${INSTALL_ROOT}/ta-proxmenu"
readonly DEFAULTS_DIR="${INSTALL_ROOT}/defaults"
readonly TAPM_REPOSITORY='https://tagit.technologyarch.com/TAI/TA-ProxMenu.git'
readonly DEFAULTS_REPOSITORY='https://git.scity.us/voltron/iDS-Defaults.git'
readonly TAPM_LAUNCHER='/usr/local/bin/tapm'
readonly REQUESTED_BRANCH="${TAPM_BRANCH:-}"
declare -a TEMP_PATHS=()
cleanup() {
local path
for path in "${TEMP_PATHS[@]}"; do
[[ -e "$path" ]] && rm -rf -- "$path"
done
}
fail() {
printf 'ERROR: %s\n' "$*" >&2
exit 1
}
clone_repository() {
local repository="$1"
local destination="$2"
local label="$3"
local branch="${4:-}"
local temporary
if [[ -d "${destination}/.git" ]]; then
printf '%s is already installed at %s; leaving it unchanged.\n' \
"$label" "$destination"
return
fi
[[ ! -e "$destination" ]] ||
fail "${destination} already exists but is not a Git repository."
temporary="${destination}.install.$$"
TEMP_PATHS+=("$temporary")
printf 'Cloning %s...\n' "$label"
if [[ -n "$branch" ]]; then
git clone --branch "$branch" --single-branch \
"$repository" "$temporary"
else
git clone "$repository" "$temporary"
fi
mv "$temporary" "$destination"
}
install_launcher() {
local current_target=''
if [[ -L "$TAPM_LAUNCHER" ]]; then
current_target="$(readlink "$TAPM_LAUNCHER")"
if [[ "$current_target" == "${TAPM_DIR}/run.sh" ]]; then
return
fi
fail "${TAPM_LAUNCHER} points to ${current_target}; it was not replaced."
fi
[[ ! -e "$TAPM_LAUNCHER" ]] ||
fail "${TAPM_LAUNCHER} already exists and was not replaced."
ln -s "${TAPM_DIR}/run.sh" "$TAPM_LAUNCHER"
}
trap cleanup EXIT
(( EUID == 0 )) || fail 'Run this installer as root.'
command -v pveversion >/dev/null 2>&1 ||
fail 'This installer must be run on a Proxmox VE host.'
if [[ -n "$REQUESTED_BRANCH" ]] &&
[[ ! "$REQUESTED_BRANCH" =~ ^[A-Za-z0-9._/-]+$ ]]; then
fail "Invalid TAPM_BRANCH value: ${REQUESTED_BRANCH}"
fi
printf '\nTA-ProxMenu Installation Script\n\n'
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates curl git jq python3 wget
mkdir -p "$INSTALL_ROOT"
clone_repository \
"$DEFAULTS_REPOSITORY" "$DEFAULTS_DIR" 'iDSSYS Defaults'
clone_repository \
"$TAPM_REPOSITORY" "$TAPM_DIR" 'TA-ProxMenu' "$REQUESTED_BRANCH"
[[ -x "${TAPM_DIR}/run.sh" ]] ||
fail "${TAPM_DIR}/run.sh is missing or is not executable."
[[ -r "${DEFAULTS_DIR}/colors.inc" ]] ||
fail "${DEFAULTS_DIR}/colors.inc is missing."
[[ -r "${DEFAULTS_DIR}/default.inc" ]] ||
fail "${DEFAULTS_DIR}/default.inc is missing."
install_launcher
# Load the standard colors only after the trusted defaults repository exists.
# shellcheck disable=SC1091
source "${DEFAULTS_DIR}/colors.inc"
printf '\n%bTA-ProxMenu has been installed.%b\n\n' \
"${idsCL[Yellow]}" "${idsCL[Default]}"
printf 'Run it with: %btapm%b\n\n' \
"${idsCL[Green]}" "${idsCL[Default]}"
if [[ -n "$REQUESTED_BRANCH" ]]; then
printf 'Installed branch: %b%s%b\n\n' \
"${idsCL[Green]}" "$REQUESTED_BRANCH" "${idsCL[Default]}"
fi
+2 -2
View File
@@ -16,9 +16,9 @@ assert_failure "source branch traversal rejected" \
TAPM_PULSE_VALID_SOURCE_BRANCH '../main' TAPM_PULSE_VALID_SOURCE_BRANCH '../main'
assert_success "HTTPS source base accepted" \ assert_success "HTTPS source base accepted" \
TAPM_PULSE_VALID_SOURCE_BASE \ TAPM_PULSE_VALID_SOURCE_BASE \
https://tagit.technologyarch.com/taiadmin/TA-ProxMenu/raw/branch/V2 https://tagit.technologyarch.com/TAI/TA-ProxMenu/raw/branch/V2
assert_failure "HTTP source base rejected" \ assert_failure "HTTP source base rejected" \
TAPM_PULSE_VALID_SOURCE_BASE \ TAPM_PULSE_VALID_SOURCE_BASE \
http://tagit.technologyarch.com/taiadmin/TA-ProxMenu/raw/branch/V2 http://tagit.technologyarch.com/TAI/TA-ProxMenu/raw/branch/V2
finish_tests finish_tests