mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 04:06:54 +00:00
Update config_menu.sh
This commit is contained in:
parent
448f089e01
commit
b5c61005ee
@ -30,7 +30,7 @@ show_config_menu() {
|
|||||||
OPTION=$(whiptail --title "$(translate "Configuration Menu")" --menu "$(translate "Select an option:")" 20 70 8 \
|
OPTION=$(whiptail --title "$(translate "Configuration Menu")" --menu "$(translate "Select an option:")" 20 70 8 \
|
||||||
"1" "$(translate "Change Language")" \
|
"1" "$(translate "Change Language")" \
|
||||||
"2" "$(translate "Show Version Information")" \
|
"2" "$(translate "Show Version Information")" \
|
||||||
"3" "$(translate "Uninstall ProxMenu")" \
|
"3" "$(translate "Uninstall ProxMenux")" \
|
||||||
"4" "$(translate "Return to Main Menu")" 3>&1 1>&2 2>&3)
|
"4" "$(translate "Return to Main Menu")" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
@ -70,12 +70,10 @@ change_language() {
|
|||||||
echo "{\"language\": \"$LANGUAGE\"}" > "$CONFIG_FILE"
|
echo "{\"language\": \"$LANGUAGE\"}" > "$CONFIG_FILE"
|
||||||
msg_ok "$(translate "Language changed to") $LANGUAGE"
|
msg_ok "$(translate "Language changed to") $LANGUAGE"
|
||||||
|
|
||||||
# 🔄 Descargar el script nuevamente
|
|
||||||
TMP_FILE=$(mktemp)
|
TMP_FILE=$(mktemp)
|
||||||
curl -s "$REPO_URL/scripts/menus/config_menu.sh" > "$TMP_FILE"
|
curl -s "$REPO_URL/scripts/menus/config_menu.sh" > "$TMP_FILE"
|
||||||
chmod +x "$TMP_FILE"
|
chmod +x "$TMP_FILE"
|
||||||
|
|
||||||
# 📌 Programar la eliminación del archivo cuando termine el proceso
|
|
||||||
trap 'rm -f "$TMP_FILE"' EXIT
|
trap 'rm -f "$TMP_FILE"' EXIT
|
||||||
|
|
||||||
exec bash "$TMP_FILE"
|
exec bash "$TMP_FILE"
|
||||||
@ -89,17 +87,23 @@ uninstall_proxmenu() {
|
|||||||
msg_info "$(translate "Uninstalling ProxMenu...")"
|
msg_info "$(translate "Uninstalling ProxMenu...")"
|
||||||
rm -rf "$BASE_DIR"
|
rm -rf "$BASE_DIR"
|
||||||
rm -f "/usr/local/bin/menu.sh"
|
rm -f "/usr/local/bin/menu.sh"
|
||||||
msg_ok "$(translate "ProxMenu has been completely uninstalled.")"
|
msg_ok "$(translate "ProxMenux has been completely uninstalled.")"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Function to show version information
|
# Function to show version information
|
||||||
show_version_info() {
|
show_version_info() {
|
||||||
local version=$(cat "$LOCAL_VERSION_FILE" 2>/dev/null || echo "1.0.0")
|
local version
|
||||||
whiptail --title "$(translate "Version Information")" --msgbox "$(translate "Current ProxMenu version:") $version" 12 60
|
version=$(<"$LOCAL_VERSION_FILE")
|
||||||
|
|
||||||
|
whiptail --title "$(translate "Version ProxMenux")" \
|
||||||
|
--msgbox "$(translate "Current ProxMenux version:") $version" 12 60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Main flow
|
# Main flow
|
||||||
|
|
||||||
show_config_menu
|
show_config_menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user