computer-playbook/roles/independent_backup-to-swappable/templates/backup-to-swappable.service.j2

8 lines
291 B
Django/Jinja

[Unit]
Description=backing up data
OnFailure=systemd-email@%n.service
ConditionPathExists={{backup_to_swappable_destination_path}}
[Service]
Type=oneshot
ExecStart=/usr/bin/bash {{backup_to_swappable_script_path}} {{backup_to_swappable_destination_path}} {{backup_to_swappable_source_path}}