Skip to content

Commit

Permalink
systemd: implement ExecStop to pause in scrub timers
Browse files Browse the repository at this point in the history
Signed-off-by: Georgy Yakovlev <[email protected]>
  • Loading branch information
gyakovlev committed Nov 8, 2021
1 parent 0dc1da8 commit 372fc09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[Unit]
Description=zpool scrub on %i
Documentation=man:zpool-scrub(8)
DefaultDependencies=no
Requires=zfs.target
After=zfs.target
ConditionACPower=true
Expand All @@ -12,3 +11,4 @@ ExecStart=/bin/sh -c '\
if @sbindir@/zpool status %i | grep "scrub in progress"; then\
exec @sbindir@/zpool wait -t scrub %i;\
else exec @sbindir@/zpool scrub -w %i; fi'
ExecStop=/bin/sh -c '@sbindir@/zpool scrub -p %i || true'

0 comments on commit 372fc09

Please sign in to comment.