1
0
mirror of https://github.com/rancher/os.git synced 2025-09-15 22:49:08 +00:00

Bounce the syslog service so it notices the hostname change

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-05-18 14:44:51 +10:00
parent 4ae80319dd
commit b217ad5732

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 {}
}