diff --git a/cmd/server/server.go b/cmd/server/server.go index e81b97c22..a0759585f 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -97,6 +97,17 @@ var rootCmd = &cobra.Command{ } go web.RunMetricsServer() go attemptStartBackend(g) + + w, err := config.WatchChanges(func() { + g.Restart() + }) + if err != nil { + l.WithError(err).Warning("failed to start watching for configuration changes, no automatic update will be done") + } + if w != nil { + defer w.Close() + } + ws.Start() <-ex running = false