mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
ipn/localapi: define a cert dir for Synology DSM6
Fixes #4060 Change-Id: I5f145d4f56f6edb14825268e858d419c55918673 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
c6648db333
commit
469c30c33b
@@ -8,6 +8,7 @@ package distro
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
@@ -94,3 +95,17 @@ func freebsdDistro() Distro {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// DSMVersion reports the Synology DSM major version.
|
||||
//
|
||||
// If not Synology, it reports 0.
|
||||
func DSMVersion() int {
|
||||
if runtime.GOOS != "linux" {
|
||||
return 0
|
||||
}
|
||||
if Get() != Synology {
|
||||
return 0
|
||||
}
|
||||
v, _ := strconv.Atoi(os.Getenv("SYNOPKG_DSM_VERSION_MAJOR"))
|
||||
return v
|
||||
}
|
||||
|
Reference in New Issue
Block a user