aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdeploy_systemd.sh9
-rw-r--r--systemd/archlinux-keyring-update.service8
-rw-r--r--systemd/archlinux-keyring-update.timer13
3 files changed, 30 insertions, 0 deletions
diff --git a/deploy_systemd.sh b/deploy_systemd.sh
new file mode 100755
index 0000000..e90f092
--- /dev/null
+++ b/deploy_systemd.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cp -v systemd/*service systemd/*timer /etc/systemd/system/
+systemctl daemon-reload
+
+cd systemd
+for f in $(ls *.timer); do systemctl enable $f ; done
+cd ..
+
diff --git a/systemd/archlinux-keyring-update.service b/systemd/archlinux-keyring-update.service
new file mode 100644
index 0000000..17f98f2
--- /dev/null
+++ b/systemd/archlinux-keyring-update.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=For updating the archlinux-keyring package
+
+[Service]
+Type=oneshot
+Exec=/usr/bin/pacman -Sy archlinux-keyring --needed --noconfirm
+User=root
+
diff --git a/systemd/archlinux-keyring-update.timer b/systemd/archlinux-keyring-update.timer
new file mode 100644
index 0000000..df6427c
--- /dev/null
+++ b/systemd/archlinux-keyring-update.timer
@@ -0,0 +1,13 @@
+[Unit]
+Description=Upgrade the archlinux-keyring package each day
+
+[Timer]
+OnBootSec=5min
+OnCalendar=*-*-* 7:00:00
+RandomizedDelaySec=20m
+Persistent=true
+Unit=archlinux-keyring-update.service
+
+[Install]
+WantedBy=timers.target
+