We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5ded8a commit 4d676a3Copy full SHA for 4d676a3
controller/configuration/defaults.go
@@ -14,11 +14,16 @@ func SetGlobal(global *models.Global, env Env) {
14
global.Localpeer = "local"
15
global.ServerStateBase = env.StateDir
16
global.ServerStateFile = "global"
17
- global.RuntimeAPIs = append(global.RuntimeAPIs, &models.RuntimeAPI{
+ runtimeAPIs := []*models.RuntimeAPI{{
18
Address: &env.RuntimeSocket,
19
ExposeFdListeners: true,
20
Level: "admin",
21
- })
+ }}
22
+ if len(global.RuntimeAPIs) == 0 {
23
+ global.RuntimeAPIs = runtimeAPIs
24
+ } else if *(global.RuntimeAPIs[0].Address) != env.RuntimeSocket {
25
+ global.RuntimeAPIs = append(runtimeAPIs, global.RuntimeAPIs...)
26
+ }
27
// Default values
28
if global.Daemon == "" {
29
global.Daemon = "enabled"
0 commit comments