mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-09 11:47:14 +02:00
Solved multiple bugs
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
# role native-pull-remote-backups
|
||||
|
||||
## debug
|
||||
### live
|
||||
To track what the service is doing execute the following command:
|
||||
|
||||
```bash
|
||||
watch -n2 "systemctl status pull-remote-backups.service"
|
||||
```
|
||||
|
||||
### history
|
||||
```bash
|
||||
sudo journalctl -u pull-remote-backups
|
||||
```
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user