#!/usr/bin/env bash set -euo pipefail # --- Check for root --- if [[ "$EUID" -ne 0 ]]; then echo "❌ Bitte als root ausführen (sudo)." exit 1 fi # --- User input --- read -rp "Newt ID: " NEWT_ID read -rp "Newt Secret: " NEWT_SECRET read -rp "Newt Endpoint (z.B. https://app.pangolin.net): " NEWT_ENDPOINT echo echo "➡️ Installiere newt über Pangolin Installer..." curl -fsSL https://static.pangolin.net/get-newt.sh | bash # --- Verify binary --- if [[ ! -x /usr/local/bin/newt ]]; then echo "❌ newt wurde nicht korrekt installiert." exit 1 fi echo "✅ newt installiert." # --- Create systemd service --- echo "➡️ Erstelle systemd Service..." cat >/etc/systemd/system/newt.service <