fix(get.sh): refresh installer files before uninstall
The uninstall shortcut was executing the stale on-disk uninstall.sh without refreshing it first, unlike the upgrade path. This meant fixes to uninstall.sh were never picked up by existing installations. Refresh all installer files before exec-ing uninstall.sh. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d67086ccd8
commit
e2265c2d89
1 changed files with 8 additions and 1 deletions
9
get.sh
9
get.sh
|
|
@ -75,8 +75,15 @@ if [[ $UNINSTALL -eq 1 ]]; then
|
||||||
if [[ "$PLATFORM" == "linux" && $EUID -ne 0 ]]; then
|
if [[ "$PLATFORM" == "linux" && $EUID -ne 0 ]]; then
|
||||||
die "run as root on Linux:\n\n curl -fsSL https://raw.githubusercontent.com/primatekuntech/triton-install/main/get.sh | sudo bash -s -- --uninstall"
|
die "run as root on Linux:\n\n curl -fsSL https://raw.githubusercontent.com/primatekuntech/triton-install/main/get.sh | sudo bash -s -- --uninstall"
|
||||||
fi
|
fi
|
||||||
[[ -f "${INSTALL_DIR}/uninstall.sh" ]] \
|
[[ -d "$INSTALL_DIR" ]] \
|
||||||
|| die "Triton Manage Server does not appear to be installed (${INSTALL_DIR} not found)"
|
|| die "Triton Manage Server does not appear to be installed (${INSTALL_DIR} not found)"
|
||||||
|
info "refreshing installer files..."
|
||||||
|
for f in "${INSTALLER_FILES[@]}"; do
|
||||||
|
curl -fsSL "${REPO_BASE}/${f}" -o "${INSTALL_DIR}/${f}"
|
||||||
|
done
|
||||||
|
chmod +x "${INSTALL_DIR}/install.sh" "${INSTALL_DIR}/upgrade.sh" "${INSTALL_DIR}/uninstall.sh"
|
||||||
|
ok "installer files refreshed"
|
||||||
|
echo ""
|
||||||
exec bash "${INSTALL_DIR}/uninstall.sh" "${PASSTHROUGH[@]}"
|
exec bash "${INSTALL_DIR}/uninstall.sh" "${PASSTHROUGH[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue