mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-10 00:30:29 +01:00
make sure backup also runs when socket isn't present
This commit is contained in:
parent
edefe69e6f
commit
8c46bd54aa
@ -153,8 +153,9 @@ func (s *script) init() error {
|
||||
// sure containers are being restarted if required.
|
||||
func (s *script) stopContainersAndRun(thunk func() error) error {
|
||||
if s.cli == nil {
|
||||
return nil
|
||||
return thunk()
|
||||
}
|
||||
|
||||
allContainers, err := s.cli.ContainerList(s.ctx, types.ContainerListOptions{
|
||||
Quiet: true,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user