diff --git a/Connect/Connect-Installer/README.md b/Connect/Connect-Installer/README.md index 270700c..7d8d183 100644 --- a/Connect/Connect-Installer/README.md +++ b/Connect/Connect-Installer/README.md @@ -22,7 +22,7 @@ This is an automated Bash script designed to simplify the installation of the Ze Run the script directly: ```bash -bash <(curl -sSL https://github.com/zeronetworks/Community/blob/master/Connect/Connect-Installer/installer.sh) +bash <(curl -sSL https://raw.githubusercontent.com/zeronetworks/Community/refs/heads/master/Connect/Connect-Installer/installer.sh) ``` You'll be prompted for: @@ -34,7 +34,7 @@ You'll be prompted for: ### Option 2: With CLI arguments ```bash -bash <(curl -sSL https://github.com/zeronetworks/Community/blob/master/Connect/Connect-Installer/installer.sh) --url +bash <(curl -sSL https://raw.githubusercontent.com/zeronetworks/Community/refs/heads/master/Connect/Connect-Installer/installer.sh) --url ``` You can also set your token as an environment variable: @@ -51,7 +51,7 @@ This avoids the interactive token prompt. ```bash export ZNC_TOKEN="" -bash <(curl -sSL https://github.com/zeronetworks/Community/blob/master/Connect/Connect-Installer/installer.sh) --url "https://download.link/path/to/zero-connect-server-setup-.zip" +bash <(curl -sSL https://raw.githubusercontent.com/zeronetworks/Community/refs/heads/master/Connect/Connect-Installer/installer.sh) --url "https://download.link/path/to/zero-connect-server-setup-.zip" ``` --- diff --git a/Connect/Connect-Installer/installer.sh b/Connect/Connect-Installer/installer.sh index ffced94..7081641 100644 --- a/Connect/Connect-Installer/installer.sh +++ b/Connect/Connect-Installer/installer.sh @@ -23,13 +23,24 @@ while [[ $# -gt 0 ]]; do esac done -# --- Tool check --- -for tool in curl unzip sudo; do - if ! command -v "$tool" &>/dev/null; then - echo "[ERROR] Missing required tool: $tool" +# --- Ensure unzip is installed --- +if ! command -v unzip &>/dev/null; then + echo "[INFO] 'unzip' not found. Attempting to install..." + + if [[ $EUID -ne 0 ]]; then + echo "[INFO] Requesting sudo access to install 'unzip'..." + sudo apt update -y + sudo apt install -y unzip + else + apt update -y + apt install -y unzip + fi + + if ! command -v unzip &>/dev/null; then + echo "[FATAL] Failed to install 'unzip'. Exiting." exit 1 fi -done +fi # --- Ask for URL if not provided --- if [[ -z "$SCRIPT_URL" ]]; then