#!/bin/bash {# nocheck: shell-template grandfathered, values only: the provider list and two paths #} # Pulls the remote backups from multiple hosts hosts="{{ DOCKER_BACKUP_REMOTE_2_LOCAL_BACKUP_PROVIDERS | join(' ') }}" errors=0 for host in $hosts; do if ! python3 {{ DOCKER_BACKUP_REMOTE_2_LOCAL_SCRIPT }} "$host" --folder "{{ DIR_BACKUPS }}"; then echo "FAILURE: pull from ${host} failed" >&2 ((errors+=1)) fi done if [ "$errors" -gt 0 ]; then exit 1 fi exit 0