From 6d6d0760cd904813b9ecddc8ddf7654f093c47b6 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 13 Oct 2017 11:18:15 +0200 Subject: [PATCH] evoacme: sed cert path after cert creation --- evoacme/files/evoacme.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index dffe334e..1019e1c4 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -134,11 +134,6 @@ main() { debug "Cert ${LIVE_CERT} expires at ${crt_end_date} => more than ${SSL_MINDAY} days: kthxbye." exit 0 fi - else - # We don't have a live symlink yet - # Let's start from scratch and configure our web server(s) - command -v apache2ctl && sed_cert_path_for_apache "${VHOST}" "${LIVE_FULLCHAIN}" - command -v nginx && sed_cert_path_for_nginx "${VHOST}" "${LIVE_FULLCHAIN}" fi #### CERTIFICATE CREATION WITH CERTBOT @@ -195,6 +190,13 @@ main() { #### CERTIFICATE ACTIVATION + if [ -h "${LIVE_DIR}" ]; then + # We don't have a live symlink yet + # Let's start from scratch and configure our web server(s) + command -v apache2ctl && sed_cert_path_for_apache "${VHOST}" "${LIVE_FULLCHAIN}" + command -v nginx && sed_cert_path_for_nginx "${VHOST}" "${LIVE_FULLCHAIN}" + fi + # link dance if [ -h "${LIVE_DIR}" ]; then rm "${LIVE_DIR}"