refactor: switch from remote URLs to local script execution

This commit is contained in:
cod378
2025-11-03 02:03:26 +00:00
parent 9570819f59
commit 6df44f1632

View File

@@ -9,7 +9,7 @@
# Last Updated: 14/08/2025 # Last Updated: 14/08/2025
# ========================================================== # ==========================================================
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"
BASE_DIR="/usr/local/share/proxmenux" BASE_DIR="/usr/local/share/proxmenux"
UTILS_FILE="$BASE_DIR/utils.sh" UTILS_FILE="$BASE_DIR/utils.sh"
@@ -49,21 +49,21 @@ done
run_manual_guide() { run_manual_guide() {
local url="$REPO_URL/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh" local SCRIPT_FILE="$LOCAL_SCRIPTS/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh"
if command -v curl >/dev/null 2>&1; then if [[ ! -f "$SCRIPT_FILE" ]]; then
bash <(curl -fsSL "$url") msg_error "$(translate "Manual guide script not found")"
else return 1
bash <(wget -qO- "$url")
fi fi
bash "$SCRIPT_FILE"
} }
run_pve8to9_check() { run_pve8to9_check() {
local url="$REPO_URL/scripts/utilities/pve8to9_check.sh" local SCRIPT_FILE="$LOCAL_SCRIPTS/utilities/pve8to9_check.sh"
if command -v curl >/dev/null 2>&1; then if [[ ! -f "$SCRIPT_FILE" ]]; then
bash <(curl -fsSL "$url") msg_error "$(translate "Check script not found")"
else return 1
bash <(wget -qO- "$url")
fi fi
bash "$SCRIPT_FILE"
} }
ask_run_mode() { ask_run_mode() {
@@ -564,7 +564,7 @@ apt_upgrade() {
exit 1 exit 1
else else
bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve8.sh") bash "$LOCAL_SCRIPTS/global/update-pve8.sh"
hash -r hash -r
fi fi