sanoid-prune.service is indeed referenced and run after the sanoid.service
Revert "Fix systemd service definitions."
This reverts commit 17e15c2f54
.
This commit is contained in:
parent
afb33e0d68
commit
90b8c92ec6
20
INSTALL.md
20
INSTALL.md
|
@ -75,7 +75,7 @@ Create a systemd service:
|
||||||
```bash
|
```bash
|
||||||
cat << "EOF" | sudo tee /etc/systemd/system/sanoid.service
|
cat << "EOF" | sudo tee /etc/systemd/system/sanoid.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Sanoid ZFS Snapshot Manager
|
Description=Snapshot ZFS Pool
|
||||||
Requires=zfs.target
|
Requires=zfs.target
|
||||||
After=zfs.target
|
After=zfs.target
|
||||||
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
|
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
|
||||||
|
@ -83,7 +83,23 @@ ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
|
||||||
[Service]
|
[Service]
|
||||||
Environment=TZ=UTC
|
Environment=TZ=UTC
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/local/sbin/sanoid --cron --verbose
|
ExecStart=/usr/local/sbin/sanoid --take-snapshots
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << "EOF" | sudo tee /etc/systemd/system/sanoid-prune.service
|
||||||
|
[Unit]
|
||||||
|
Description=Cleanup ZFS Pool
|
||||||
|
Requires=zfs.target
|
||||||
|
After=zfs.target sanoid.service
|
||||||
|
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment=TZ=UTC
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/local/sbin/sanoid --prune-snapshots
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sanoid.service
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue