From 3e1ce7f00628bed99c630b5eb5f4c6761b24de6d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 18 Oct 2016 12:57:19 -0200 Subject: Import-certs: concat.pem; cert.pem and cert.crt symlinks; restart services --- share/hydra/import-certs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/share/hydra/import-certs b/share/hydra/import-certs index 63cb935..74f8d21 100755 --- a/share/hydra/import-certs +++ b/share/hydra/import-certs @@ -55,6 +55,8 @@ EOF keyringer $HYDRA ls -1 ssl/ | grep crt | while read cert; do cert="`basename $cert .asc`" priv="`basename $cert .crt`.pem" + prefix="`basename $cert .crt`" + domain="`facter domain`" $HYDRA_CONNECT $hostname < /dev/null" + + # Post-processing + $HYDRA_CONNECT $hostname < /dev/null + + # Restart services + services="apache2 postfix nginx lighttpd mumble" + for service in \$services; do + if systemctl list-units | grep active | grep -q $service'.service'; then + sudo service $service restart + fi + done +EOF + done done -- cgit v1.2.3