mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 18:11:59 +00:00
paths: use /var/db for state on BSDs, and /var/run for sockets.
On BSD, /var/db is what linux calls /var/lib. On modern linux, /run and /var/run are the same directory, but on BSD the correct path is /var/run, so use that. Fixes #79 Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
committed by
Dave Anderson
parent
20da44eae3
commit
dbc99dc0d2
@@ -21,8 +21,8 @@ func DefaultTailscaledSocket() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return ""
|
||||
}
|
||||
if fi, err := os.Stat("/run"); err == nil && fi.IsDir() {
|
||||
return "/run/tailscale/tailscaled.sock"
|
||||
if fi, err := os.Stat("/var/run"); err == nil && fi.IsDir() {
|
||||
return "/var/run/tailscale/tailscaled.sock"
|
||||
}
|
||||
return "tailscaled.sock"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user