diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-01-27 11:07:22 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-01-27 11:07:22 -0200 |
commit | c3cf75db0aef682b2db55488ddd8df5054162c9e (patch) | |
tree | fe93cab8953458b9672c08206f999335d575b6af | |
parent | 9079e0229aa73684924c861d23c41589bac6e7bb (diff) | |
download | hydra-c3cf75db0aef682b2db55488ddd8df5054162c9e.tar.gz hydra-c3cf75db0aef682b2db55488ddd8df5054162c9e.tar.bz2 |
Newkeys: can generate for given nodes only
-rwxr-xr-x | share/hydra/newkeys | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/hydra/newkeys b/share/hydra/newkeys index 37e76e8..3fe782f 100755 --- a/share/hydra/newkeys +++ b/share/hydra/newkeys @@ -19,7 +19,13 @@ function hydra_newkeys { # Generates ssh and gpg keys for new or existing nodes # GPG keys should be manually imported in the nodes - for host in `hydra $HYDRA nodes`; do + if [ ! -z "$1" ]; then + NODES="$*" + else + NODES="`hydra $HYDRA nodes`" + fi + + for host in $NODES; do node="`echo $host | cut -d . -f 1`" sshkey="$HYDRA_FOLDER/keyring/keys/nodes/$node/ssh/id_rsa.asc" gpgkey="$HYDRA_FOLDER/keyring/keys/nodes/$node/gpg/key.asc" |