mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-29 04:36:54 +00:00
Update storage_menu.sh
This commit is contained in:
parent
d84eeaef4a
commit
75e7624d2a
@ -11,7 +11,7 @@
|
|||||||
# ==========================================================
|
# ==========================================================
|
||||||
|
|
||||||
|
|
||||||
# Configuration
|
# Configuration ============================================
|
||||||
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
|
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
|
||||||
UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh"
|
UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh"
|
||||||
BASE_DIR="/usr/local/share/proxmenux"
|
BASE_DIR="/usr/local/share/proxmenux"
|
||||||
@ -19,13 +19,25 @@ CACHE_FILE="$BASE_DIR/cache.json"
|
|||||||
VENV_PATH="/opt/googletrans-env"
|
VENV_PATH="/opt/googletrans-env"
|
||||||
LANGUAGE=$(jq -r '.language // "en"' "$BASE_DIR/config.json" 2>/dev/null)
|
LANGUAGE=$(jq -r '.language // "en"' "$BASE_DIR/config.json" 2>/dev/null)
|
||||||
|
|
||||||
|
|
||||||
# Try to load utils.sh from GitHub
|
|
||||||
if ! source <(curl -sSf "$UTILS_URL"); then
|
if ! source <(curl -sSf "$UTILS_URL"); then
|
||||||
echo "$(translate 'Error: Could not load utils.sh from') $UTILS_URL"
|
echo "$(translate 'Error: Could not load utils.sh from') $UTILS_URL"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
initialize_cache() {
|
||||||
|
if [ ! -f "$CACHE_FILE" ]; then
|
||||||
|
echo "{}" > "$CACHE_FILE"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
load_language() {
|
||||||
|
if [ -f "$CONFIG_FILE" ]; then
|
||||||
|
LANGUAGE=$(jq -r '.language' "$CONFIG_FILE")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# ==========================================================
|
||||||
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
OPTION=$(whiptail --title "$(translate "Disk and Storage Menu")" --menu "$(translate "Select an option:")" 15 60 3 \
|
OPTION=$(whiptail --title "$(translate "Disk and Storage Menu")" --menu "$(translate "Select an option:")" 15 60 3 \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user