commit c607f18605f5e093b57805827e21082c69ab7285 Author: Fabio Boi Date: Fri Dec 19 15:43:57 2025 +0100 init.sh hinzugefügt diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..0b533c1 --- /dev/null +++ b/init.sh @@ -0,0 +1,53 @@ +#!/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 <