Merge pull request #375 from johnramsden/master

Declare that sanoid service 'Wants' sanoid-prune
This commit is contained in:
Jim Salter 2019-05-22 10:32:28 -04:00 committed by GitHub
commit 39af643817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -78,6 +78,8 @@ cat << "EOF" | sudo tee /etc/systemd/system/sanoid.service
Description=Snapshot ZFS Pool
Requires=zfs.target
After=zfs.target
Wants=sanoid-prune.service
Before=sanoid-prune.service
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
[Service]

View File

@ -7,7 +7,7 @@ ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
[Service]
Environment=TZ=UTC
Type=oneshot
ExecStart=/usr/sbin/sanoid --prune-snapshots
ExecStart=/usr/sbin/sanoid --prune-snapshots --verbose
[Install]
WantedBy=sanoid.service

View File

@ -2,9 +2,11 @@
Description=Snapshot ZFS Pool
Requires=zfs.target
After=zfs.target
Wants=sanoid-prune.service
Before=sanoid-prune.service
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
[Service]
Environment=TZ=UTC
Type=oneshot
ExecStart=/usr/sbin/sanoid --take-snapshots
ExecStart=/usr/sbin/sanoid --take-snapshots --verbose