Allow setting the advertise address via an environment variable.

Fixes #581
This commit is contained in:
Jeff Mitchell
2015-12-14 21:22:55 -05:00
parent 6e46e56b21
commit d7cb3c9f94
3 changed files with 9 additions and 1 deletions

View File

@@ -147,6 +147,10 @@ func (c *ServerCommand) Run(args []string) int {
coreConfig.AdvertiseAddr = config.HABackend.AdvertiseAddr
}
if envAA := os.Getenv("VAULT_ADVERTISE_ADDR"); envAA != "" {
coreConfig.AdvertiseAddr = envAA
}
// Attempt to detect the advertise address possible
var detect physical.AdvertiseDetect
var ok bool