From b230c873b300c4af21ed52f99899c7756f2b5460 Mon Sep 17 00:00:00 2001 From: RipleyBooya Date: Mon, 24 Feb 2025 02:09:49 +0100 Subject: [PATCH] Update entrypoint.tailscale.sh remove TAILSCALE_AUTHKEY for now and replace it with TAILSCALE_PARAM --- docker/entrypoint.tailscale.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/docker/entrypoint.tailscale.sh b/docker/entrypoint.tailscale.sh index 93243aa..fce1e5f 100644 --- a/docker/entrypoint.tailscale.sh +++ b/docker/entrypoint.tailscale.sh @@ -8,23 +8,19 @@ if [ -z "$SSH_HOST" ] || [ -z "$SSH_USER" ] || [ -z "$REMOTE_PORTS" ] || [ -z "$ exit 1 fi +# Vérifier que TAILSCALE_PARAM est défini +if [ -z "$TAILSCALE_PARAM" ]; then + echo "ERROR: TAILSCALE_PARAM is required but not set." + exit 1 +fi + # Démarrage de Tailscale echo "Starting Tailscale..." tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock & sleep 5 -echo "Connecting to Tailscale..." - -# Vérifier si TAILSCALE_PARAM est défini, sinon utiliser la clé d'authentification par défaut -if [ -n "$TAILSCALE_PARAM" ]; then - tailscale up $TAILSCALE_PARAM -else - if [ -z "$TAILSCALE_AUTH_KEY" ]; then - echo "ERROR: Either TAILSCALE_PARAM or TAILSCALE_AUTH_KEY must be set." - exit 1 - fi - tailscale up --authkey=${TAILSCALE_AUTH_KEY} --ssh -fi +echo "Connecting to Tailscale with: tailscale up ${TAILSCALE_PARAM}" +tailscale up ${TAILSCALE_PARAM} # Vérifier que Tailscale est bien actif if ! tailscale status; then