From 5c1fd1e0d4287811db4f978985fd6f8bc82bdde1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 23 Jun 2016 10:47:41 -0300 Subject: Implement import-certs --- share/hydra/import-certs | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/share/hydra/import-certs b/share/hydra/import-certs index dee4bdb..15daca3 100755 --- a/share/hydra/import-certs +++ b/share/hydra/import-certs @@ -30,6 +30,41 @@ fi # Deploy for node in $NODES; do - # TODO - echo "Not implemented!" + hostname="`hydra_get_fqdn_from_nodename $node`" + + echo "-----------------------------------------------------" + echo "Importing certs and keys into $hostname:/etc/ssl... " + echo "-----------------------------------------------------" + + echo "Creating folder structure at $hostname:/etc/ssl..." + $HYDRA_CONNECT $hostname < /dev/null" + + echo "Importing $priv from keyringer to $hostname:/etc/ssl/private..." + keyringer $HYDRA decrypt ssl/$priv | \ + $HYDRA_CONNECT $hostname "cat - | sudo tee /etc/ssl/private/$priv > /dev/null" + done done -- cgit v1.2.3