cmd/tailscaled: move more of the Windows server setup code into tailscaled

Updates #1232
This commit is contained in:
Brad Fitzpatrick
2021-02-05 09:53:54 -08:00
parent 6f7974b7f2
commit a7562be5e1
5 changed files with 127 additions and 9 deletions

View File

@ -8,6 +8,7 @@ package paths
import (
"os"
"path/filepath"
"runtime"
)
@ -42,5 +43,8 @@ func DefaultTailscaledStateFile() string {
if f := stateFileFunc; f != nil {
return f()
}
if runtime.GOOS == "windows" {
return filepath.Join(os.Getenv("LocalAppData"), "Tailscale", "server-state.conf")
}
return ""
}