2 Description=zpool trim on %i
3 Documentation=man:zpool-trim(8)
7 ConditionPathIsDirectory=/sys/module/zfs
10 EnvironmentFile=-@initconfdir@/zfs
11 ExecStart=/bin/sh -c '\
12 if @sbindir@/zpool status %i | grep -q "(trimming)"; then\
13 exec @sbindir@/zpool wait -t trim %i;\
14 else exec @sbindir@/zpool trim -w %i; fi'
15 ExecStop=-/bin/sh -c '@sbindir@/zpool trim -s %i 2>/dev/null || true'