Skip to content

Instantly share code, notes, and snippets.

@Frederick888
Created January 24, 2019 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frederick888/1e03c78b599d0c51959dcf0a671d735b to your computer and use it in GitHub Desktop.
Save Frederick888/1e03c78b599d0c51959dcf0a671d735b to your computer and use it in GitHub Desktop.
Simple systemd timer to refresh GnuPG public keys
[Unit]
Description=Refreshes GnuPG keys for %I
Requires=network.target network-online.target
After=network.target network-online.target
[Service]
Type=oneshot
User=%i
ExecStart=/usr/bin/gpg --refresh-keys
StandardOutput=journal
StandardError=journal
[Unit]
Description=Refreshes GnuPG keys for %I
Requires=network.target network-online.target
After=network.target network-online.target
[Timer]
OnCalendar=*-*-* 20:00:00
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment