mirror of
https://github.com/roles-ansible/ansible_role_restic.git
synced 2024-12-11 23:41:32 +01:00
24 lines
615 B
Django/Jinja
24 lines
615 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.service_options is defined %}
|
|
{% for key, value in item.service_options.items() %}
|
|
{{key}}={{value}}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% 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"
|