1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 14:23:11 +00:00

Merge pull request #1865 from SvenDowideit/bounce-syslog

Bounce the syslog service so it notices the hostname change
This commit is contained in:
Sven Dowideit
2017-05-19 16:41:10 +10:00
committed by GitHub

View File

@@ -1,6 +1,9 @@
package network
import (
"golang.org/x/net/context"
"github.com/rancher/os/docker"
"github.com/rancher/os/log"
"github.com/docker/libnetwork/resolvconf"
@@ -15,6 +18,16 @@ func Main() {
cfg := config.LoadConfig()
ApplyNetworkConfig(cfg)
log.Infof("Restart syslog")
client, err := docker.NewSystemClient()
if err != nil {
log.Error(err)
}
if err := client.ContainerRestart(context.Background(), "syslog", 10); err != nil {
log.Error(err)
}
select {}
}