paths: update some default paths for darwin

pull/1335/head
Brad Fitzpatrick 4 years ago
parent 20e66c5b92
commit 54e108ff4e

@ -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"
}

@ -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 ""
}

Loading…
Cancel
Save