Start using OnSuccess
This commit is contained in:
parent
4074a45983
commit
f6d22f01da
@ -6,6 +6,7 @@ After=zfs.target
|
|||||||
ConditionACPower=true
|
ConditionACPower=true
|
||||||
ConditionPathIsDirectory=/sys/module/zfs
|
ConditionPathIsDirectory=/sys/module/zfs
|
||||||
OnFailure=status-mail@%n.service
|
OnFailure=status-mail@%n.service
|
||||||
|
OnSuccess=status-mail@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/default/zfs
|
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;\
|
exec /usr/sbin/zpool wait -t scrub %i;\
|
||||||
else exec /usr/sbin/zpool scrub -w %i; fi'
|
else exec /usr/sbin/zpool scrub -w %i; fi'
|
||||||
ExecStop=-/bin/sh -c '/usr/sbin/zpool scrub -p %i 2>/dev/null || true'
|
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
|
||||||
|
@ -6,6 +6,7 @@ After=zfs.target
|
|||||||
ConditionACPower=true
|
ConditionACPower=true
|
||||||
ConditionPathIsDirectory=/sys/module/zfs
|
ConditionPathIsDirectory=/sys/module/zfs
|
||||||
OnFailure=status-mail@%n.service
|
OnFailure=status-mail@%n.service
|
||||||
|
OnSuccess=status-mail@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/default/zfs
|
EnvironmentFile=-/etc/default/zfs
|
||||||
|
Loading…
Reference in New Issue
Block a user