mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 11:36:17 +00:00
refactor: replace remote script loading with local file execution
- Changed script loading from curl-based remote fetching to local file execution for improved security and reliability - Removed dependency on external repository access for core menu functionality - Fixed missing semicolon in case statement default branch
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
# ==========================================================
|
||||
|
||||
# Configuration ============================================
|
||||
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
|
||||
LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"
|
||||
BASE_DIR="/usr/local/share/proxmenux"
|
||||
UTILS_FILE="$BASE_DIR/utils.sh"
|
||||
VENV_PATH="/opt/googletrans-env"
|
||||
@@ -40,22 +40,23 @@ show_main_menu() {
|
||||
|
||||
case $CHOICE in
|
||||
1)
|
||||
bash <(curl -s "$REPO_URL/scripts/lxc/lxc-privileged-to-unprivileged.sh")
|
||||
bash "$LOCAL_SCRIPTS/lxc/lxc-privileged-to-unprivileged.sh"
|
||||
;;
|
||||
2)
|
||||
bash <(curl -s "$REPO_URL/scripts/lxc/lxc-unprivileged-to-privileged.sh")
|
||||
bash "$LOCAL_SCRIPTS/lxc/lxc-unprivileged-to-privileged.sh"
|
||||
;;
|
||||
3)
|
||||
show_container_status
|
||||
;;
|
||||
4)
|
||||
bash <(curl -s "$REPO_URL/scripts/lxc/lxc-conversion-manual-guide.sh")
|
||||
bash "$LOCAL_SCRIPTS/lxc/lxc-conversion-manual-guide.sh"
|
||||
;;
|
||||
5)
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
|
||||
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
|
||||
}
|
||||
|
||||
@@ -99,6 +100,4 @@ show_container_status() {
|
||||
show_main_menu
|
||||
}
|
||||
|
||||
|
||||
|
||||
show_main_menu
|
||||
show_main_menu
|
||||
|
||||
Reference in New Issue
Block a user