Added .cymais.service suffix to make cymais files more visible

This commit is contained in:
2024-01-10 11:18:38 +01:00
parent f3ce00dca7
commit b7e3a7f838
68 changed files with 144 additions and 132 deletions

View File

@@ -1,5 +1,5 @@
- name: "reload backup-data-to-usb.service"
- name: "reload backup-data-to-usb.cymais.service"
systemd:
name: backup-data-to-usb.service
name: backup-data-to-usb.cymais.service
state: reloaded
daemon_reload: yes

View File

@@ -9,8 +9,8 @@
- name: Copy systemd service to systemd directory
template:
src: backup-data-to-usb.service.j2
dest: /etc/systemd/system/backup-data-to-usb.service
dest: /etc/systemd/system/backup-data-to-usb.cymais.service
owner: root
group: root
mode: '0644'
notify: reload backup-data-to-usb.service
notify: reload backup-data-to-usb.cymais.service

View File

@@ -1,11 +1,11 @@
[Unit]
Description=Backup to USB when mounted to {{ backup_to_usb_mount }}
Wants={{systemctl_mount_service_name}}
OnFailure=systemd-notifier@%n.service
OnFailure=systemd-notifier.cymais@%n.service
[Service]
ExecStart=/bin/python {{ backup_to_usb_script_path }} {{backup_to_usb_source}} {{backup_to_usb_destination}}
ExecStartPost=/bin/systemctl start cleanup-backups.service
ExecStartPost=/bin/systemctl start cleanup-backups.cymais.service
[Install]
WantedBy=multi-user.target