From 44ce83917219df1663658a572b21917eba326458 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 16 Jul 2019 12:04:53 +0200 Subject: Fixed borg cron not working on openbsd --- templates/backup.sh.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'templates') diff --git a/templates/backup.sh.j2 b/templates/backup.sh.j2 index 6549fe2..89fcccb 100644 --- a/templates/backup.sh.j2 +++ b/templates/backup.sh.j2 @@ -4,13 +4,13 @@ # ~~~~ ~~~~ # ############################################################################### -HOME=/root -PATH=${PATH}:/usr/local/bin -BORG_RSH="ssh -i /root/.ssh/borg" +export HOME=/root +export PATH=${PATH}:/usr/local/bin +export BORG_RSH="ssh -i /root/.ssh/borg" {% for job in borg_jobs %} {% if job.command_to_pipe is defined %} -{{ job.command_to_pipe }} | BORG_RSH="ssh -i /root/.ssh/borg" borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path | default('-') }} +{{ job.command_to_pipe }} | borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path | default('-') }} {% else %} borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path }} {% endif %} -- cgit v1.2.3