ansible_role_restic/templates/restic.service.j2
2024-01-04 17:52:05 +00:00

19 lines
478 B
Django/Jinja

[Unit]
Description=Backup {{ item.name }} using restic
{% if item.lvm is defined %}
Conflicts=fstrim.service
After=fstrim.timer
{% endif %}
[Service]
Type=oneshot
{% if item.lvm is defined %}
PrivateMounts=on
{% endif %}
{% if item.niceness is defined %}
ExecStart=/usr/bin/nice -n {{ item.niceness }} {{ restic_script_dir }}/backup-{{ item.name }}.sh
{% else %}
ExecStart={{ restic_script_dir }}/backup-{{ item.name }}.sh
{% endif %}
TimeoutStartSec=0
Environment="CRON=true"