use --statedir instead of --state

This commit is contained in:
John Bowdre 2023-12-29 12:05:47 -06:00
parent b637d4b477
commit 79403d8e57
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@ services:
environment: environment:
TS_AUTHKEY: ${TS_AUTHKEY:?err} # from https://login.tailscale.com/admin/settings/authkeys TS_AUTHKEY: ${TS_AUTHKEY:?err} # from https://login.tailscale.com/admin/settings/authkeys
TS_HOSTNAME: ${TS_HOSTNAME:-ts-docker} TS_HOSTNAME: ${TS_HOSTNAME:-ts-docker}
TS_STATE: "/var/lib/tailscale/tailscale.state" # store ts state in a local volume TS_STATEDIR: "/var/lib/tailscale/" # store ts state in a local volume
TS_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80') TS_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80')
TS_FUNNEL_PORT: ${TS_FUNNEL_PORT:-} # optional port to publish publicly with tailscale funnel (ex: '80') TS_FUNNEL_PORT: ${TS_FUNNEL_PORT:-} # optional port to publish publicly with tailscale funnel (ex: '80')
volumes: volumes:

View file

@ -1,7 +1,7 @@
#!/bin/ash #!/bin/ash
trap 'kill -TERM $PID' TERM INT trap 'kill -TERM $PID' TERM INT
echo "Starting Tailscale daemon" echo "Starting Tailscale daemon"
tailscaled --tun=userspace-networking --state=${TS_STATE} ${TS_OPT} & tailscaled --tun=userspace-networking --statedir="${TS_STATEDIR}" ${TS_OPT} &
PID=$! PID=$!
until tailscale up --authkey="${TS_AUTHKEY}" --hostname="${TS_HOSTNAME}"; do until tailscale up --authkey="${TS_AUTHKEY}" --hostname="${TS_HOSTNAME}"; do
sleep 0.1 sleep 0.1