mirror of
https://github.com/rancher/os.git
synced 2025-08-29 11:34:42 +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:
commit
6d5fc4c499
@ -1,6 +1,9 @@
|
|||||||
package network
|
package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"golang.org/x/net/context"
|
||||||
|
|
||||||
|
"github.com/rancher/os/docker"
|
||||||
"github.com/rancher/os/log"
|
"github.com/rancher/os/log"
|
||||||
|
|
||||||
"github.com/docker/libnetwork/resolvconf"
|
"github.com/docker/libnetwork/resolvconf"
|
||||||
@ -15,6 +18,16 @@ func Main() {
|
|||||||
cfg := config.LoadConfig()
|
cfg := config.LoadConfig()
|
||||||
ApplyNetworkConfig(cfg)
|
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 {}
|
select {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user