From 6b3a41dfe07957400de51a62fcfc109317bc0309 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Mon, 17 Nov 2025 16:40:56 +0100 Subject: [PATCH] Update install_proxmenux.sh --- install_proxmenux.sh | 47 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index c9074e3..349af5f 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -727,7 +727,17 @@ install_normal_version() { update_config "jq" "already_installed" fi - BASIC_DEPS=("dialog" "curl" "git") + + + + + BASIC_DEPS=("dialog" "curl") + + if [ -z "${APT_UPDATED:-}" ]; then + apt-get update -y > /dev/null 2>&1 || true + APT_UPDATED=1 + fi + for pkg in "${BASIC_DEPS[@]}"; do if ! dpkg -l | grep -qw "$pkg"; then if apt-get install -y "$pkg" > /dev/null 2>&1; then @@ -741,9 +751,42 @@ install_normal_version() { update_config "$pkg" "already_installed" fi done - + + + if ! command -v git > /dev/null 2>&1; then + msg_info "Installing git (required to clone the ProxMenux repository)." + + + if [ -z "${APT_UPDATED:-}" ]; then + apt-get update -y > /dev/null 2>&1 || true + APT_UPDATED=1 + fi + + if ! apt-get install -y git > /dev/null 2>&1; then + msg_error "Failed to install git. Please run 'apt-get install git' manually and rerun the installer." + update_config "git" "failed" + return 1 + fi + + + if ! command -v git > /dev/null 2>&1; then + msg_error "Git is still not available after installation. Aborting to avoid a broken setup." + update_config "git" "failed" + return 1 + fi + + update_config "git" "installed" + else + update_config "git" "already_installed" + fi + msg_ok "jq, dialog, curl and git installed successfully." + + + + + ((current_step++)) show_progress $current_step $total_steps "Install ProxMenux repository"