diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-06-22 12:48:16 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-10-07 19:33:41 -0400 |
commit | 2ef982e9ae24a11bdf20224f2d17178700561ce7 (patch) | |
tree | 9bdacf962e502b9757ba200ebdedb0dab6488577 | |
parent | bc1dde9138ce4023828f593f90e3bf7406c1f5d9 (diff) |
Add from Parabola: systemd files
If you're seeing this in `git blame`, it chose to follow the wrong
ancestor of a merge commit.
-rwxr-xr-x | cron-jobs/update-lastsync | 4 | ||||
-rw-r--r-- | systemd/update-lastsync.service | 7 | ||||
-rw-r--r-- | systemd/update-lastsync.timer | 10 |
3 files changed, 21 insertions, 0 deletions
diff --git a/cron-jobs/update-lastsync b/cron-jobs/update-lastsync new file mode 100755 index 0000000..799c761 --- /dev/null +++ b/cron-jobs/update-lastsync @@ -0,0 +1,4 @@ +#!/bin/bash + +. "$(dirname "$(readlink -e "$0")")/../config" +date -u +'%s' > "${FTP_BASE}/lastsync" diff --git a/systemd/update-lastsync.service b/systemd/update-lastsync.service new file mode 100644 index 0000000..33abd45 --- /dev/null +++ b/systemd/update-lastsync.service @@ -0,0 +1,7 @@ +[Unit] +Description=Update ${FTP_BASE}/lastsync + +[Service] +Type=oneshot +User=repo +ExecStart=/opt/dbscripts/cron-jobs/update-lastsync diff --git a/systemd/update-lastsync.timer b/systemd/update-lastsync.timer new file mode 100644 index 0000000..428c0e2 --- /dev/null +++ b/systemd/update-lastsync.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Periodic update of ${FTP_BASE}/lastsync + +[Timer] +OnCalendar=*-*-* *:00/10:00 +AccuracySec=1us +Persistent=true + +[Install] +WantedBy=timers.target |