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:
Christoph Klaffl 2019-03-31 15:21:19 +02:00
parent afb33e0d68
commit 90b8c92ec6
No known key found for this signature in database
GPG Key ID: FC1C525C2A47CC28
1 changed files with 18 additions and 2 deletions

View File

@ -75,7 +75,7 @@ Create a systemd service:
```bash
cat << "EOF" | sudo tee /etc/systemd/system/sanoid.service
[Unit]
Description=Sanoid ZFS Snapshot Manager
Description=Snapshot ZFS Pool
Requires=zfs.target
After=zfs.target
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
@ -83,7 +83,23 @@ ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
[Service]
Environment=TZ=UTC
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
```