2023-05-27 23:04:22 +02:00
|
|
|
[Unit]
|
2023-05-28 16:35:45 +02:00
|
|
|
Description=Backup to USB when mounted to {{ backup_to_usb_mount }}
|
|
|
|
Wants={{systemctl_mount_service_name}}
|
2024-01-10 11:18:38 +01:00
|
|
|
OnFailure=systemd-notifier.cymais@%n.service
|
2023-05-27 23:04:22 +02:00
|
|
|
|
|
|
|
[Service]
|
2024-01-23 09:58:47 +01:00
|
|
|
Type=oneshot
|
2023-05-28 16:35:45 +02:00
|
|
|
ExecStart=/bin/python {{ backup_to_usb_script_path }} {{backup_to_usb_source}} {{backup_to_usb_destination}}
|
2024-01-10 11:18:38 +01:00
|
|
|
ExecStartPost=/bin/systemctl start cleanup-backups.cymais.service
|
2023-05-27 23:04:22 +02:00
|
|
|
|
|
|
|
[Install]
|
2023-05-28 16:35:45 +02:00
|
|
|
WantedBy=multi-user.target
|