This commit is contained in:
David Schroeder
2026-07-28 20:14:57 -05:00
parent eca9bd2be2
commit 8418cbed56
4 changed files with 70 additions and 8 deletions
+17 -7
View File
@@ -7,6 +7,7 @@ source /opt/idssys/ta-proxmenu/defaults.inc
source /opt/idssys/ta-proxmenu/inc/git-update.inc
source /opt/idssys/ta-proxmenu/inc/ha-status.inc
source /opt/idssys/ta-proxmenu/inc/post-install.inc
source /opt/idssys/ta-proxmenu/inc/rmm.inc
source /opt/idssys/ta-proxmenu/inc/deploy-iso-nfs-lxc.sh
source /opt/idssys/ta-proxmenu/inc/deploy-pulse-lxc.sh
source /opt/idssys/ta-proxmenu/inc/virtio-helpers.inc
@@ -356,6 +357,7 @@ INSTALL_RMM() {
local RMMURL=''
local TOKEN=''
local installer
local installer_dir
local temp_dir
echo
@@ -369,17 +371,16 @@ INSTALL_RMM() {
read -r -s RMMURL
echo
[[ -n "$RMMURL" ]] || { echo "No URL supplied."; FINISH_FAILED_ACTION; return; }
if [[ "$RMMURL" != *TKN* || "$RMMURL" != */RUN* ]]; then
if ! TOKEN="$(TAPM_RMM_TOKEN_FROM_URL "$RMMURL")"; then
echo "Unable to extract the RMM token from the URL."
unset RMMURL
unset RMMURL TOKEN
FINISH_FAILED_ACTION
return
fi
TOKEN="${RMMURL#*TKN}"
TOKEN="${TOKEN%%/RUN*}"
if [[ -z "$TOKEN" ]]; then
if ! TAPM_RMM_ENSURE_SUDO; then
unset RMMURL TOKEN
echo "The RMM token is empty."
echo -e "${idsCL[LightRed]}Unable to install the sudo dependency required by the RMM installer.${idsCL[Default]}"
FINISH_FAILED_ACTION
return
fi
@@ -390,7 +391,16 @@ INSTALL_RMM() {
return
fi
temp_dir="$TAPM_TEMP_DIR"
installer="${temp_dir}/rmminstall"
# Preserve the token-bearing portion of the original URL because the
# vendor installer also attempts to derive TOKEN from its own pathname.
installer_dir="${temp_dir}/ITSPlatform_TKN${TOKEN}/RUN"
if ! mkdir -p "$installer_dir" || ! chmod 0700 "$installer_dir"; then
unset RMMURL TOKEN
TAPM_CLEAN_TEMP_DIR "$temp_dir"
FINISH_FAILED_ACTION
return
fi
installer="${installer_dir}/setup"
if ! TAPM_DOWNLOAD_HTTPS "$RMMURL" "$installer" 'RMM installer'; then
unset RMMURL TOKEN
TAPM_CLEAN_TEMP_DIR "$temp_dir"