homeserver/roles/mgrote.zfs_scrub/templates/zpool-scrub@.service.j2
mg 49f3c00885 ZFS: scrub: cron --> systemd-timer (#341)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#341
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-03-19 13:28:41 +01:00

13 lines
316 B
Django/Jinja

{{ file_header | default () }}
[Unit]
Description=Scrub ZFS pool "%i"
Requires=zfs.target
After=zfs.target
OnFailure=zpool-scrub-mail.service
[Service]
Type=simple
ExecStartPre=-{{ zfs_extra_path_zpool }} scrub -s %i
ExecStart={{ zfs_extra_path_zpool }} scrub -w %i
ExecStop={{ zfs_extra_path_zpool }} scrub -s %i