mirror of
https://github.com/status-im/consul.git
synced 2025-01-13 15:26:48 +00:00
agent: Better warning for keyring with -encrypt option. Fixes #718.
This commit is contained in:
parent
be8b14979e
commit
4193525931
@ -162,12 +162,12 @@ func (c *Command) readConfig() *Config {
|
|||||||
}
|
}
|
||||||
keyfileLAN := filepath.Join(config.DataDir, serfLANKeyring)
|
keyfileLAN := filepath.Join(config.DataDir, serfLANKeyring)
|
||||||
if _, err := os.Stat(keyfileLAN); err == nil {
|
if _, err := os.Stat(keyfileLAN); err == nil {
|
||||||
c.Ui.Error("WARNING: LAN keyring exists but -encrypt given, ignoring")
|
c.Ui.Error("WARNING: LAN keyring exists but -encrypt given, using keyring")
|
||||||
}
|
}
|
||||||
if config.Server {
|
if config.Server {
|
||||||
keyfileWAN := filepath.Join(config.DataDir, serfWANKeyring)
|
keyfileWAN := filepath.Join(config.DataDir, serfWANKeyring)
|
||||||
if _, err := os.Stat(keyfileWAN); err == nil {
|
if _, err := os.Stat(keyfileWAN); err == nil {
|
||||||
c.Ui.Error("WARNING: WAN keyring exists but -encrypt given, ignoring")
|
c.Ui.Error("WARNING: WAN keyring exists but -encrypt given, using keyring")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user