From 2b5b36ec63072485d21c1103c514e3682b5d7bd4 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Fri, 2 Apr 2021 12:02:53 -0400 Subject: [PATCH] paths: add synology socket path Signed-off-by: David Crawshaw --- paths/paths.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paths/paths.go b/paths/paths.go index 2f0ea7c93..677b8f8d3 100644 --- a/paths/paths.go +++ b/paths/paths.go @@ -26,6 +26,13 @@ func DefaultTailscaledSocket() string { if runtime.GOOS == "darwin" { return "/var/run/tailscaled.socket" } + if runtime.GOOS == "linux" { + // TODO(crawshaw): does this path change with DSM7? + const synologySock = "/volume1/@appstore/Tailscale/var/tailscaled.sock" // SYNOPKG_PKGDEST in scripts/installer + if fi, err := os.Stat(filepath.Dir(synologySock)); err == nil && fi.IsDir() { + return synologySock + } + } if fi, err := os.Stat("/var/run"); err == nil && fi.IsDir() { return "/var/run/tailscale/tailscaled.sock" }