diff options
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/systemd/system/lostfiles.service | 10 | ||||
| -rw-r--r-- | etc/systemd/system/lostfiles.timer | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/etc/systemd/system/lostfiles.service b/etc/systemd/system/lostfiles.service new file mode 100644 index 0000000..4d94a18 --- /dev/null +++ b/etc/systemd/system/lostfiles.service @@ -0,0 +1,10 @@ +[Unit] +Description=Refresh lostfiles report at /run/lostfiles.txt +Documentation=man:lostfiles(1) +ConditionPathExists=/usr/bin/lostfiles + +[Service] +Type=oneshot +Nice=19 +IOSchedulingClass=idle +ExecStart=/bin/sh -c '/usr/bin/lostfiles >/run/lostfiles.txt.tmp && mv /run/lostfiles.txt.tmp /run/lostfiles.txt' diff --git a/etc/systemd/system/lostfiles.timer b/etc/systemd/system/lostfiles.timer new file mode 100644 index 0000000..e99d4be --- /dev/null +++ b/etc/systemd/system/lostfiles.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Weekly lostfiles report refresh + +[Timer] +OnCalendar=weekly +AccuracySec=12h +Persistent=true +RandomizedDelaySec=1h + +[Install] +WantedBy=timers.target |
