Skip restarting

pull/9/head
Harry Walter 10 years ago
parent ad32d1c677
commit ac7375a1da

@ -34,7 +34,7 @@ func containerFilter(names []string) container.Filter {
// used to start those containers have been updated. If a change is detected in // used to start those containers have been updated. If a change is detected in
// any of the images, the associated containers are stopped and restarted with // any of the images, the associated containers are stopped and restarted with
// the new image. // the new image.
func Update(client container.Client, names []string, cleanup bool) error { func Update(client container.Client, names []string, cleanup bool, noRestart bool) error {
log.Info("Checking containers for updated images") log.Info("Checking containers for updated images")
containers, err := client.ListContainers(containerFilter(names)) containers, err := client.ListContainers(containerFilter(names))
@ -86,8 +86,10 @@ func Update(client container.Client, names []string, cleanup bool) error {
} }
} }
if err := client.StartContainer(container); err != nil { if !noRestart {
log.Error(err) if err := client.StartContainer(container); err != nil {
log.Error(err)
}
} }
if cleanup { if cleanup {

Loading…
Cancel
Save