infrastructure/roles/lvm_self_backup/templates/backup-error.service
saibotk 4dfd382a75
feat(lvm_self_backup): Add error service when systemd service fails
This is to be notified when the systemd service fails to e.g. unmount the partition.
2024-02-21 22:25:46 +01:00

6 lines
345 B
Desktop File

[Unit]
Description=Writes the error for the monitoring to pick the failure up.
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c 'echo 1337 > {{ lvm_self_backup_status_directory }}/backup.status && chown {{ lvm_self_backup_status_directory_uid }}:{{ lvm_self_backup_status_directory_gid }} {{ lvm_self_backup_status_directory }}/backup.status'