Add systemd service and timer units

This commit is contained in:
Eric Torres 2023-01-02 21:15:39 -08:00
parent 8379941fd9
commit 46fd75c013
4 changed files with 34 additions and 0 deletions

8
snapraid-scrub.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Run SnapRAID scrub command
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=idle
ExecStart=/usr/bin/snapraid scrub --plan full

9
snapraid-scrub.timer Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Runs SnapRAID scrub monthly
[Timer]
OnCalendar=Monthly, 02:00
Persistent=true
[Install]
WantedBy=timers.target

8
snapraid-sync.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Run SnapRAID sync command
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=idle
ExecStart=/usr/bin/snapraid sync

9
snapraid-sync.timer Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Runs SnapRAID sync nightly
[Timer]
OnCalendar=Mon-Sun, 01:00
Persistent=true
[Install]
WantedBy=timers.target