mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-01 14:05:39 +00:00
cmd/derper: add /home/bradfitz/keys to default mesh key search list
This commit is contained in:
parent
e01a4c50ba
commit
5798826990
@ -299,9 +299,14 @@ func prodAutocertHostPolicy(_ context.Context, host string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func defaultMeshPSKFile() string {
|
func defaultMeshPSKFile() string {
|
||||||
const def = "/home/derp/keys/derp-mesh.key"
|
try := []string{
|
||||||
if _, err := os.Stat(def); err == nil {
|
"/home/derp/keys/derp-mesh.key",
|
||||||
return def
|
filepath.Join(os.Getenv("HOME"), "keys", "derp-mesh.key"),
|
||||||
|
}
|
||||||
|
for _, p := range try {
|
||||||
|
if _, err := os.Stat(p); err == nil {
|
||||||
|
return p
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user