mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 23:57:07 +00:00
agent: only set the proxy manager data dir if its set
This commit is contained in:
parent
1a32435a4d
commit
f5ccc65295
@ -363,7 +363,12 @@ func (a *Agent) Start() error {
|
|||||||
a.proxyManager = proxy.NewManager()
|
a.proxyManager = proxy.NewManager()
|
||||||
a.proxyManager.State = a.State
|
a.proxyManager.State = a.State
|
||||||
a.proxyManager.Logger = a.logger
|
a.proxyManager.Logger = a.logger
|
||||||
|
if a.config.DataDir != "" {
|
||||||
|
// DataDir is required for all non-dev mode agents, but we want
|
||||||
|
// to allow setting the data dir for demos and so on for the agent,
|
||||||
|
// so do the check above instead.
|
||||||
a.proxyManager.DataDir = filepath.Join(a.config.DataDir, "proxy")
|
a.proxyManager.DataDir = filepath.Join(a.config.DataDir, "proxy")
|
||||||
|
}
|
||||||
go a.proxyManager.Run()
|
go a.proxyManager.Run()
|
||||||
|
|
||||||
// Start watching for critical services to deregister, based on their
|
// Start watching for critical services to deregister, based on their
|
||||||
|
Loading…
x
Reference in New Issue
Block a user