From 54e108ff4ef08a6f53b06830e0012d812fe17eae Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 13 Feb 2021 12:10:20 -0800 Subject: [PATCH] paths: update some default paths for darwin --- paths/paths.go | 3 +++ paths/paths_unix.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/paths/paths.go b/paths/paths.go index 0bb028085..b42b2864f 100644 --- a/paths/paths.go +++ b/paths/paths.go @@ -28,6 +28,9 @@ func DefaultTailscaledSocket() string { if runtime.GOOS == "windows" { return "" } + if runtime.GOOS == "darwin" { + return "/var/run/tailscaled.socket" + } if fi, err := os.Stat("/var/run"); err == nil && fi.IsDir() { return "/var/run/tailscale/tailscaled.sock" } diff --git a/paths/paths_unix.go b/paths/paths_unix.go index bde26948e..1633fc32e 100644 --- a/paths/paths_unix.go +++ b/paths/paths_unix.go @@ -23,6 +23,8 @@ func statePath() string { return "/var/lib/tailscale/tailscaled.state" case "freebsd", "openbsd": return "/var/db/tailscale/tailscaled.state" + case "darwin": + return "/Library/Tailscale/tailscaled.state" default: return "" }