mirror of
https://github.com/jbowdre/tailscale-docker.git
synced 2024-11-22 18:12:18 +00:00
9626fd835c
* Allow user to set additional Tailscaled options * Added example use of TAILSCALE_OPT
12 lines
414 B
Bash
12 lines
414 B
Bash
#!/bin/ash
|
|
trap 'kill -TERM $PID' TERM INT
|
|
echo "Starting Tailscale daemon"
|
|
# -state=mem: will logout and remove ephemeral node from network immediately after ending.
|
|
tailscaled --tun=userspace-networking --state=${TAILSCALE_STATE_ARG} ${TAILSCALE_OPT} &
|
|
PID=$!
|
|
until tailscale up --authkey="${TAILSCALE_AUTH_KEY}" --hostname="${TAILSCALE_HOSTNAME}"; do
|
|
sleep 0.1
|
|
done
|
|
tailscale status
|
|
wait ${PID}
|
|
wait ${PID}
|