diff --git a/cmd/tailscale/cli/cli.go b/cmd/tailscale/cli/cli.go index 6b0bb7957..efbdd3e40 100644 --- a/cmd/tailscale/cli/cli.go +++ b/cmd/tailscale/cli/cli.go @@ -84,7 +84,7 @@ func CleanUpArgs(args []string) []string { // Run runs the CLI. The args do not include the binary name. func Run(args []string) (err error) { - if runtime.GOOS == "linux" && os.Getenv("GOKRAZY_FIRST_START") == "1" && distro.Get() == distro.Gokrazy { + if runtime.GOOS == "linux" && os.Getenv("GOKRAZY_FIRST_START") == "1" && distro.Get() == distro.Gokrazy && os.Getppid() == 1 { // We're running on gokrazy and it's the first start. // Don't run the tailscale CLI as a service; just exit. // See https://gokrazy.org/development/process-interface/