From e5d29b3271da1eab48041032fd7f922486ad54a5 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 26 Apr 2009 13:33:04 +0200 Subject: Added multi-send-key script --- Makefile | 2 +- multi-send-key | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100755 multi-send-key diff --git a/Makefile b/Makefile index b207c9f..2b9b618 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BINDIR = $(HOME)/bin -TARGETS = mkheader.py isprime +TARGETS = mkheader.py isprime multi-send-key all: $(TARGETS) @echo "Nothing to be done" diff --git a/multi-send-key b/multi-send-key new file mode 100755 index 0000000..0dad01c --- /dev/null +++ b/multi-send-key @@ -0,0 +1,84 @@ +#!/bin/bash +# +# multi-send-key - Send signed PGP/GPG keys to multiple keyservers +# +# Copyright (C) 2004-2006, Tobias Klauser +# This file is licensed under the GNU General Public License v2 + +REV='1.18' + +gpg_bin=`which gpg` + +SCRIPT=`basename $0` +KEYS="" +KEYSERVERS=" + $KEYSERVERS + subkeys.pgp.net" +# pgp.uni-mainz.de +# sks.keyserver.penguin.de +# wwwkeys.ch.pgp.net +# keyserver.kjsl.com + +version() { + cat >&2 < +Licensed under the GNU General Public License. +EOF + exit 1 +} + +usage() { + # XXX -f not implemented + cat >&2 < /dev/null + +if [ $? -eq 0 ] ; then + for server in $KEYSERVERS ; do + for key in $KEYS ; do + echo "* Sending key [$key] to server [$server]" + $gpg_bin --keyserver $server --send-key $key &> /dev/null + if [ "$?" -gt 0 ]; then + echo "* An error happened while sending the key to [$server]." + fi + done + done +else + echo "* Keys [$KEYS] not found in GPG default keyring." + exit 5; +fi + +exit 0; -- cgit v1.2.3-54-g00ecf