allow password to be set through WEAVE_PASSWORD env var

so that passwords can be supplied w/o them showing up in 'ps'
This commit is contained in:
Matthias Radestock committed 2014-12-19 23:19:28 +00:00
1 parent f33ecad3fb
commit ff69868922
1 file changed
+9
+9
View File
@@ -73,6 +73,15 @@ func main() {
log.Fatal(err)
}
if password == "" {
password = os.Getenv("WEAVE_PASSWORD")
}
if password == "" {
log.Println("Communication between peers is unencrypted.")
} else {
log.Println("Communication between peers is encrypted.")
}
var logFrame func(string, []byte, *layers.Ethernet)
if debug {
logFrame = func(prefix string, frame []byte, eth *layers.Ethernet) {