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