From 53987dc5ef4d850c7f680c7a1e1c7af92e1a10df Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 26 Dec 2020 16:39:43 +0100 Subject: [PATCH] solved pull-remote-backups bugs --- .../templates/pull-remote-backups.service | 4 ++-- .../templates/pull-remote-backups.sh | 5 +++++ .../templates/pull-remote-backups.timer | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 roles/native-pull-remote-backups/templates/pull-remote-backups.sh diff --git a/roles/native-pull-remote-backups/templates/pull-remote-backups.service b/roles/native-pull-remote-backups/templates/pull-remote-backups.service index da85bc32..32cbf58d 100644 --- a/roles/native-pull-remote-backups/templates/pull-remote-backups.service +++ b/roles/native-pull-remote-backups/templates/pull-remote-backups.service @@ -1,6 +1,6 @@ [Unit] -Description=docker volume update +Description=pull remote backups [Service] Type=oneshot -ExecStart=hosts="{{pull_remote_backups_hosts}}";for host in $hosts; do /usr/bin/bash /usr/local/bin/pull-remote-backup/pull-remote-backup.sh $host; done; +ExecStart=/usr/bin/bash /usr/local/bin/pull-remote-backups.sh diff --git a/roles/native-pull-remote-backups/templates/pull-remote-backups.sh b/roles/native-pull-remote-backups/templates/pull-remote-backups.sh new file mode 100644 index 00000000..d425716f --- /dev/null +++ b/roles/native-pull-remote-backups/templates/pull-remote-backups.sh @@ -0,0 +1,5 @@ +#!/bin/bash +hosts="{{pull_remote_backups_hosts}}"; +for host in $hosts; do + bash /usr/local/bin/pull-remote-backup/pull-remote-backup.sh $host; +done; diff --git a/roles/native-pull-remote-backups/templates/pull-remote-backups.timer b/roles/native-pull-remote-backups/templates/pull-remote-backups.timer index 26df1182..254c7c80 100644 --- a/roles/native-pull-remote-backups/templates/pull-remote-backups.timer +++ b/roles/native-pull-remote-backups/templates/pull-remote-backups.timer @@ -1,5 +1,5 @@ [Unit] -Description=pulls a remote backup +Description=starts pull remote backup timer [Timer] OnCalendar=22:00