diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2022-03-01 20:17:31 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <brad@danga.com> | 2022-03-01 20:35:18 -0800 |
| commit | f18bb6397be81ad316fbc2905ab315cc1644bb3d (patch) | |
| tree | 5a164b6e5b7619cf4ad0dfa24189893643176494 /cmd | |
| parent | db85384f9c751a330933486445d9e93b82873f77 (diff) | |
| download | tailscale-f18bb6397be81ad316fbc2905ab315cc1644bb3d.tar.xz tailscale-f18bb6397be81ad316fbc2905ab315cc1644bb3d.zip | |
cmd/tailscale: tell gokrazy to not manage the CLI as a daemon
In the future we'll probably want to run the "tailscale web"
server instead, but for now stop the infinite restart loop.
See https://gokrazy.org/userguide/process-interface/ for details.
Updates #1866
Change-Id: I4133a5fdb859b848813972620495865727fe397a
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/tailscale/cli/cli.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/tailscale/cli/cli.go b/cmd/tailscale/cli/cli.go index 7cc4e2778..adf1e90f2 100644 --- a/cmd/tailscale/cli/cli.go +++ b/cmd/tailscale/cli/cli.go @@ -129,6 +129,13 @@ func Run(args []string) error { if len(args) == 1 && (args[0] == "-V" || args[0] == "--version") { args = []string{"version"} } + if runtime.GOOS == "linux" && distro.Get() == distro.Gokrazy && len(args) == 0 && + os.Getenv("GOKRAZY_FIRST_START") == "1" { + // Exit with 125 otherwise the CLI binary is restarted + // forever in a loop by the Gokrazy process supervisor. + // See https://gokrazy.org/userguide/process-interface/ + os.Exit(125) + } var warnOnce sync.Once tailscale.SetVersionMismatchHandler(func(clientVer, serverVer string) { |
