1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/restart.go
Antonio Murdaca e41192a3f8 Remove job from restart
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-16 18:50:24 +02:00

15 lines
340 B
Go

package daemon
import "fmt"
func (daemon *Daemon) ContainerRestart(name string, seconds int) error {
container, err := daemon.Get(name)
if err != nil {
return err
}
if err := container.Restart(seconds); err != nil {
return fmt.Errorf("Cannot restart container %s: %s\n", name, err)
}
container.LogEvent("restart")
return nil
}