mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
Adds a nightly timer (02:00, after the secrets snapshot) next to the existing plug trigger. ConditionPathIsMountPoint on the unit makes an unmounted tick a silent condition-skip instead of a failure, so the schedule only ever acts when the device is currently plugged in. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
12 lines
374 B
Django/Jinja
12 lines
374 B
Django/Jinja
[Unit]
|
|
Description=Backup to USB when mounted to {{ BACKUP_TO_USB_MOUNT }}
|
|
Wants={{ BACKUPS_SERVICE_MNT_NAME }}
|
|
ConditionPathIsMountPoint={{ BACKUP_TO_USB_MOUNT }}
|
|
OnFailure={{ SYS_SERVICE_ON_FAILURE_COMPOSE }}
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart={{ system_service_script_exec }} {{ BACKUP_TO_USB_SOURCE }} {{ BACKUP_TO_USB_DESTINATION }}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |