Solved multiple bugs

This commit is contained in:
2021-01-05 19:40:52 +01:00
parent 1276415dd0
commit 9b09e5711b
6 changed files with 19 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
[Unit]
Description=pull remote backups
OnFailure=systemd-email@%n.service
[Service]
Type=oneshot
ExecStart=/usr/bin/bash /usr/local/bin/pull-remote-backups.sh
OnFailure=systemd-email@%n.service

View File

@@ -1,5 +1,7 @@
#!/bin/bash
hosts="{{pull_remote_backups_hosts}}";
errors=0
for host in $hosts; do
bash /usr/local/bin/pull-remote-backup/pull-remote-backup.sh $host;
bash /usr/local/bin/pull-remote-backup/pull-remote-backup.sh $host || ((errors+=1));
done;
exit $errors;