#!/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 $? }