From bc7976d3b978e95eb5c736db0fb2ec5e643674a7 Mon Sep 17 00:00:00 2001 From: Asainte Bueno-Villanueva Date: Sat, 7 Feb 2026 22:37:03 -0500 Subject: [PATCH] add initial darwin (mac) support reformat text --- modules/netbird-strike | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/modules/netbird-strike b/modules/netbird-strike index f1095ba..0375775 100644 --- a/modules/netbird-strike +++ b/modules/netbird-strike @@ -1,13 +1,14 @@ #!/bin/bash # ----------------------------------------------------------------------- -# Dynasty Module: Universal NetBird Strike v1.0 +# Dynasty Module: Universal NetBird Strike v1.1 # ----------------------------------------------------------------------- # --- 1. OS & Architecture Detection --- if [[ "$OSTYPE" == "darwin"* ]]; then OS="macOS" ARCH=$(uname -m) - NB_VERSION="0.30.1" + # Automatically handle versioning - you can update this string later + NB_VERSION="0.30.1" if [[ "$ARCH" == "arm64" ]]; then FILE_NAME="netbird_ui_darwin_arm64.pkg" @@ -20,36 +21,43 @@ else fi # --- 2. Execution Logic --- -echo -e "\033[38;5;45m🐉 Initiating NetBird Strike on $OS...\033[0m" +echo "-------------------------------------------------" +echo "Initiating NetBird Strike v1.1 on $OS" +echo "-------------------------------------------------" if [[ "$OS" == "macOS" ]]; then + # macOS Native Strike if command -v netbird &> /dev/null; then - echo -e "\033[38;5;178m⚠️ NetBird is already manifested on this Mac.\033[0m" + echo "STATUS: NetBird is already manifested on this Mac." else - echo -e "\033[38;5;45m📥 Downloading Native Package for $ARCH...\033[0m" + echo "ACTION: Downloading Native Package for $ARCH..." curl -L "$PKG_URL" -o "/tmp/netbird.pkg" - echo -e "\033[38;5;45m🛡️ Installing (Requires Admin Password)...\033[0m" + echo "ACTION: Installing (Admin Password Required)..." sudo installer -pkg "/tmp/netbird.pkg" -target / rm "/tmp/netbird.pkg" fi else + # Linux Strike if ! command -v netbird &> /dev/null; then - echo -e "\033[38;5;45m📡 Fetching Linux Repository...\033[0m" + echo "ACTION: Fetching Linux Repository..." curl -sSL https://pkgs.netbird.io/install.sh | sudo bash else - echo -e "\033[38;5;178m⚠️ NetBird already exists in this realm.\033[0m" + echo "STATUS: NetBird already exists in this realm." fi fi -# --- 3. Finalization --- -echo -e "\033[38;5;127m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" -read -p "🔑 Enter Setup Key (or leave blank to login via UI): " SETUP_KEY < /dev/tty +# --- 3. Connection Logic --- +echo "-------------------------------------------------" +read -p "Enter Setup Key (or leave blank for UI login): " SETUP_KEY < /dev/tty if [[ -z "$SETUP_KEY" ]]; then - echo -e "\033[38;5;178mManual login required. Use the NetBird UI or 'netbird up' to connect.\033[0m" + echo "NOTICE: Manual login required via UI or 'netbird up'." else + echo "ACTION: Connecting to mesh..." sudo netbird up --setup-key "$SETUP_KEY" fi -echo -e "\033[38;5;178m✅ Strike Complete.\033[0m" \ No newline at end of file +echo "-------------------------------------------------" +echo "STRIKE COMPLETE: v1.1 Manifested." +echo "-------------------------------------------------" \ No newline at end of file