mirror of
https://github.com/jimsalterjrs/sanoid.git
synced 2024-08-30 05:16:03 +02:00
Merge pull request #365 from danielewood/patch-1
Fix systemd service definitions.
This commit is contained in:
commit
afb33e0d68
1 changed files with 2 additions and 18 deletions
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=Snapshot ZFS Pool
|
Description=Sanoid ZFS Snapshot Manager
|
||||||
Requires=zfs.target
|
Requires=zfs.target
|
||||||
After=zfs.target
|
After=zfs.target
|
||||||
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
|
ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
|
||||||
|
@ -83,23 +83,7 @@ ConditionFileNotEmpty=/etc/sanoid/sanoid.conf
|
||||||
[Service]
|
[Service]
|
||||||
Environment=TZ=UTC
|
Environment=TZ=UTC
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/local/sbin/sanoid --take-snapshots
|
ExecStart=/usr/local/sbin/sanoid --cron --verbose
|
||||||
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 a new issue