summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clean-cache.service6
-rw-r--r--clean-cache.timer10
2 files changed, 16 insertions, 0 deletions
diff --git a/clean-cache.service b/clean-cache.service
new file mode 100644
index 0000000..5a3f699
--- /dev/null
+++ b/clean-cache.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=clean arch-mirror cache
+
+[Service]
+Type=simple
+ExecStart=/usr/src/arch-mirror/clean-cache
diff --git a/clean-cache.timer b/clean-cache.timer
new file mode 100644
index 0000000..aab6ee2
--- /dev/null
+++ b/clean-cache.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Periodically clean arch-mirror cache.
+
+[Timer]
+AccuracySec=1us
+RandomizedDelaySec=1h
+OnCalendar=*-*-* *:00:00
+
+[Install]
+WantedBy=timers.target