aboutsummaryrefslogtreecommitdiffstats
path: root/sanoid-prune.service
diff options
context:
space:
mode:
Diffstat (limited to 'sanoid-prune.service')
-rw-r--r--sanoid-prune.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/sanoid-prune.service b/sanoid-prune.service
new file mode 100644
index 0000000..03a27f6
--- /dev/null
+++ b/sanoid-prune.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Prune ZFS snapshots
+Documentation=man:sanoid(8)
+Requires=local-fs.target
+After=local-fs.target sanoid.service
+ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
+
+[Service]
+Type=oneshot
+Environment=TZ=UTC
+ExecStart=/usr/sbin/sanoid --prune-snapshots --verbose
+
+[Install]
+WantedBy=sanoid.service