initial commit
This commit is contained in:
24
entrypoint.sh
Normal file
24
entrypoint.sh
Normal 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
|
||||
Reference in New Issue
Block a user