Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

Fix wait for tailscale - #2

Open
prognostikos wants to merge 3 commits into
ynab:mainfrom
BetterNowOrg:fix-wait-for-tailscale
Open

Fix wait for tailscale#2
prognostikos wants to merge 3 commits into
ynab:mainfrom
BetterNowOrg:fix-wait-for-tailscale

Conversation

@prognostikos

@prognostikos prognostikos commented May 15, 2025

Copy link
Copy Markdown

Heroku's 24 stack does not include bc, so waiting for tailscale to be up does not work. This PR changes the function to use awk for the calculation.

In addition I've added the ability to configure the timeout by setting TAILSCALE_RUNNING_TIMEOUT in the environment.

@prognostikos
prognostikos force-pushed the fix-wait-for-tailscale branch from fdda0b7 to 879571d Compare May 16, 2025 11:20
The Heroku-24 stack does not include `bc` and bash cannot do non-integer
math. Use `awk` to convert the timeout & interval to milliseconds so we
can use build-in bash math operators.
@prognostikos
prognostikos force-pushed the fix-wait-for-tailscale branch from 879571d to 7368b9c Compare May 16, 2025 12:28
@prognostikos

Copy link
Copy Markdown
Author

Took a few attempts to get a working version but should be good now.

@prognostikos

Copy link
Copy Markdown
Author

Oddly enough I don't think the original code ever worked as bc is not in the 20, 22, or 24 Heroku stack images

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant