feat: replace remote script fetching with local file execution

This commit is contained in:
cod378
2025-11-03 01:20:11 +00:00
parent 3275a1ecb4
commit 60a97e5815

View File

@@ -12,7 +12,7 @@
# Configuration ============================================ # Configuration ============================================
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"
VENV_PATH="/opt/googletrans-env" VENV_PATH="/opt/googletrans-env"
@@ -36,13 +36,13 @@ initialize_cache
case $OPTION in case $OPTION in
1) 1)
bash <(curl -s "$REPO_URL/scripts/utilities/uup_dump_iso_creator.sh") bash "$LOCAL_SCRIPTS/utilities/uup_dump_iso_creator.sh"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
return return
fi fi
;; ;;
2) 2)
bash <(curl -s "$REPO_URL/scripts/utilities/system_utils.sh") bash "$LOCAL_SCRIPTS/utilities/system_utils.sh"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
return return
fi fi
@@ -64,19 +64,20 @@ initialize_cache
dialog_result=$? dialog_result=$?
if [[ $dialog_result -eq 0 ]]; then if [[ $dialog_result -eq 0 ]]; then
bash <(curl -s "$REPO_URL/scripts/utilities/proxmox_update.sh") bash "$LOCAL_SCRIPTS/utilities/proxmox_update.sh"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
return return
fi fi
fi fi
;; ;;
4) 4)
bash <(curl -s "$REPO_URL/scripts/utilities/upgrade_pve8_to_pve9.sh") bash "$LOCAL_SCRIPTS/utilities/upgrade_pve8_to_pve9.sh"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
return return
fi fi
;; ;;
5) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; 5) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;;
*) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; *) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;;
esac esac
done done