Update import-disk-image.sh

This commit is contained in:
MacRimi 2025-02-02 09:52:04 +01:00 committed by GitHub
parent 90d26ee721
commit 7f56d54981
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,20 +11,18 @@
# ========================================================== # ==========================================================
# Configuration # Configuration ============================================
UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh" REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
BASE_DIR="/usr/local/share/proxmenux" BASE_DIR="/usr/local/share/proxmenux"
CACHE_FILE="$BASE_DIR/cache.json" UTILS_FILE="$BASE_DIR/utils.sh"
VENV_PATH="/opt/googletrans-env" VENV_PATH="/opt/googletrans-env"
LANGUAGE=$(jq -r '.language // "en"' "$BASE_DIR/config.json" 2>/dev/null)
if [[ -f "$UTILS_FILE" ]]; then
source "$UTILS_FILE"
# Try to load utils.sh from GitHub
if ! source <(curl -sSf "$UTILS_URL"); then
echo "$(translate 'Error: Could not load utils.sh from') $UTILS_URL"
exit 1
fi fi
load_language
initialize_cache
# ==========================================================
# Path where disk images are stored # Path where disk images are stored
IMAGES_DIR="/var/lib/vz/template/images/" IMAGES_DIR="/var/lib/vz/template/images/"