diff --git a/etc/systemd/system/zfs-scrub@.service.in b/etc/systemd/system/zfs-scrub@.service.in index 600de989190d..3c4750df8817 100644 --- a/etc/systemd/system/zfs-scrub@.service.in +++ b/etc/systemd/system/zfs-scrub@.service.in @@ -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 @@ -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'