diff --git a/playbooks/roles/system/zfs/files/scrub/zfs-scrub@.service b/playbooks/roles/system/zfs/files/scrub/zfs-scrub@.service index e44a61f..d1a9159 100644 --- a/playbooks/roles/system/zfs/files/scrub/zfs-scrub@.service +++ b/playbooks/roles/system/zfs/files/scrub/zfs-scrub@.service @@ -6,6 +6,7 @@ After=zfs.target ConditionACPower=true ConditionPathIsDirectory=/sys/module/zfs OnFailure=status-mail@%n.service +OnSuccess=status-mail@%n.service [Service] EnvironmentFile=-/etc/default/zfs @@ -14,4 +15,4 @@ if /usr/sbin/zpool status %i | grep -q "scrub in progress"; then\ exec /usr/sbin/zpool wait -t scrub %i;\ else exec /usr/sbin/zpool scrub -w %i; fi' ExecStop=-/bin/sh -c '/usr/sbin/zpool scrub -p %i 2>/dev/null || true' -ExecStopPost=/bin/sh -c '/usr/local/sbin/systemd-mail-zpool-status %i' +ExecStopPost=/usr/local/sbin/systemd-mail-zpool-status %i diff --git a/playbooks/roles/system/zfs/files/trim/zfs-trim@.service b/playbooks/roles/system/zfs/files/trim/zfs-trim@.service index cb39df5..e3b364e 100644 --- a/playbooks/roles/system/zfs/files/trim/zfs-trim@.service +++ b/playbooks/roles/system/zfs/files/trim/zfs-trim@.service @@ -6,6 +6,7 @@ After=zfs.target ConditionACPower=true ConditionPathIsDirectory=/sys/module/zfs OnFailure=status-mail@%n.service +OnSuccess=status-mail@%n.service [Service] EnvironmentFile=-/etc/default/zfs