aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-05-16 10:36:18 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-05-16 10:36:18 -0300
commita5530b8c90ca6a6d7cf858f645c24f64f946a450 (patch)
treeb56d6e700c215967225ac95d825babbfba2354b2 /lib
parentd17b5910e9f9cecff52c8a1775355340ab8ea836 (diff)
downloadhydra-a5530b8c90ca6a6d7cf858f645c24f64f946a450.tar.gz
hydra-a5530b8c90ca6a6d7cf858f645c24f64f946a450.tar.bz2
Single-key support for eyaml
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/deploy8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy
index 320b557..196b944 100644
--- a/lib/hydra/deploy
+++ b/lib/hydra/deploy
@@ -128,12 +128,20 @@ function hydra_deploy_copy_keys {
# Ensure key availability
hydra $HYDRA eyaml $FQDN
+ # Test for multi-keys setup
if [ -e "$HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/private_key.pkcs7.pem" ]; then
hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/private_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/private_key.pkcs7.pem
+ # Then try single-key setup
+ elif [ -e "$HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem" ]; then
+ hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/private_key.pkcs7.pem
fi
+ # Test for multi-keys setup
if [ -e "$HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/public_key.pkcs7.pem" ]; then
hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/public_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/public_key.pkcs7.pem
+ # Then try single-key setup
+ elif [ -e "$HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem" ]; then
+ hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/public_key.pkcs7.pem
fi
}