summaryrefslogtreecommitdiff
path: root/libre/pacman/pacman-keyring.initd
diff options
context:
space:
mode:
Diffstat (limited to 'libre/pacman/pacman-keyring.initd')
-rw-r--r--libre/pacman/pacman-keyring.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/libre/pacman/pacman-keyring.initd b/libre/pacman/pacman-keyring.initd
new file mode 100644
index 000000000..1945af58b
--- /dev/null
+++ b/libre/pacman/pacman-keyring.initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+
+# This is not a daemon; but a short-lived process,
+# which only needs to run occasionally.
+# Running it as a pseudo-service,
+# simplifies the install (rather than requiring a cron deamon).
+# Users must only add it to the 'default' runlevel.
+
+
+name="pacman-keyring"
+description="Refresh pacman keyring"
+
+
+depend() {
+ need net
+ after logger
+}
+
+# Custom start() function with wrapper, to always exit "success" status.
+# The command will exit non-zero upon any failed key retrieval;
+# which is common if not likely, due to the large number of keys it fetches.
+start() {
+ ebegin "Starting ${RC_SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/bash -- -c '/usr/bin/pacman-key --refresh-keys || :'
+ eend $?
+}