initial commit

This commit is contained in:
2025-11-03 19:47:43 +01:00
commit e211ce6770
6 changed files with 144 additions and 0 deletions

24
entrypoint.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
set -e
echo "[+] Starting Tailscale daemon..."
/usr/local/bin/tailscaled --state=/var/lib/tailscale/tailscaled.state &
sleep 2
# Prüfen, ob bereits verbunden
if ! tailscale status >/dev/null 2>&1; then
echo "[+] Bringing up Tailscale..."
tailscale up \
--authkey="${TS_AUTHKEY}" \
--login-server="${TS_LOGIN_SERVER:-https://controlplane.tailscale.com}" \
--hostname="${TS_HOSTNAME:-portainer-agent}" \
--accept-dns="${TS_ACCEPT_DNS:-false}" \
--accept-routes="${TS_ACCEPT_ROUTES:-true}"
else
echo "[+] Existing Tailscale session found, skipping login."
fi
echo "[+] Tailscale IP: $(tailscale ip -4 || true)"
echo "[+] Starting Portainer Agent..."
exec /app/agent