From 293b71f03608edc6ce0dfa9214da3fed8a8d9b98 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 23 Jun 2016 14:05:11 +0200 Subject: [PATCH] library/roles: Fix all the letsencrypt hook script. We need to use the FQDN hostname. --- apache/files/apache-letsencrypt-acme.sh | 1 - haproxy/files/haproxy-letsencrypt-acme.sh | 3 ++- nginx/files/nginx-letsencrypt-acme.sh | 1 - openldap-server/files/openldap-letsencrypt-acme.sh | 3 ++- openvpn/files/openvpn-letsencrypt-acme.sh | 3 ++- postgresql/files/postgresql-letsencrypt-acme.sh | 3 ++- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apache/files/apache-letsencrypt-acme.sh b/apache/files/apache-letsencrypt-acme.sh index 968140e7..5d10a4eb 100644 --- a/apache/files/apache-letsencrypt-acme.sh +++ b/apache/files/apache-letsencrypt-acme.sh @@ -1,7 +1,6 @@ #!/bin/bash LE_SERVICES_SCRIPT_DIR=/usr/lib/acme/hooks -LE_CERTS_DIR=/var/lib/acme/live/$HOSTNAME LE_LOG_DIR=/var/log/letsencrypt DATE=$( date ) diff --git a/haproxy/files/haproxy-letsencrypt-acme.sh b/haproxy/files/haproxy-letsencrypt-acme.sh index 7b9d4adb..67464589 100644 --- a/haproxy/files/haproxy-letsencrypt-acme.sh +++ b/haproxy/files/haproxy-letsencrypt-acme.sh @@ -1,7 +1,8 @@ #!/bin/bash +H_NAME=$( hostname -f ) LE_SERVICES_SCRIPT_DIR=/usr/lib/acme/hooks -LE_CERTS_DIR=/var/lib/acme/live/$HOSTNAME +LE_CERTS_DIR=/var/lib/acme/live/$H_NAME LE_LOG_DIR=/var/log/letsencrypt HAPROXY_CERTDIR=/etc/pki/haproxy HAPROXY_CERTFILE=$HAPROXY_CERTDIR/haproxy.pem diff --git a/nginx/files/nginx-letsencrypt-acme.sh b/nginx/files/nginx-letsencrypt-acme.sh index 074dbc27..d18314b3 100644 --- a/nginx/files/nginx-letsencrypt-acme.sh +++ b/nginx/files/nginx-letsencrypt-acme.sh @@ -1,7 +1,6 @@ #!/bin/bash LE_SERVICES_SCRIPT_DIR=/usr/lib/acme/hooks -LE_CERTS_DIR=/var/lib/acme/live/$HOSTNAME LE_LOG_DIR=/var/log/letsencrypt DATE=$( date ) diff --git a/openldap-server/files/openldap-letsencrypt-acme.sh b/openldap-server/files/openldap-letsencrypt-acme.sh index 05b4fe69..3f1f07c8 100644 --- a/openldap-server/files/openldap-letsencrypt-acme.sh +++ b/openldap-server/files/openldap-letsencrypt-acme.sh @@ -1,7 +1,8 @@ #!/bin/bash +H_NAME=$( hostname -f ) LE_SERVICES_SCRIPT_DIR=/usr/lib/acme/hooks -LE_CERTS_DIR=/var/lib/acme/live/$HOSTNAME +LE_CERTS_DIR=/var/lib/acme/live/$H_NAME LE_LOG_DIR=/var/log/acme OPENLDAP_CERTDIR=/etc/pki/openldap DATE=$( date ) diff --git a/openvpn/files/openvpn-letsencrypt-acme.sh b/openvpn/files/openvpn-letsencrypt-acme.sh index d531c3e0..36d7f8bb 100644 --- a/openvpn/files/openvpn-letsencrypt-acme.sh +++ b/openvpn/files/openvpn-letsencrypt-acme.sh @@ -1,7 +1,8 @@ #!/bin/bash +H_NAME=$( hostname -f ) LE_SERVICES_SCRIPT_DIR=/usr/lib/acme/hooks -LE_CERTS_DIR=/var/lib/acme/live/$HOSTNAME +LE_CERTS_DIR=/var/lib/acme/live/$H_NAME LE_LOG_DIR=/var/log/letsencrypt DATE=$( date ) diff --git a/postgresql/files/postgresql-letsencrypt-acme.sh b/postgresql/files/postgresql-letsencrypt-acme.sh index 7ff0d353..571cc2d7 100644 --- a/postgresql/files/postgresql-letsencrypt-acme.sh +++ b/postgresql/files/postgresql-letsencrypt-acme.sh @@ -1,7 +1,8 @@ #!/bin/bash +H_NAME=$( hostname -f ) LE_SERVICES_SCRIPT_DIR=/usr/lib/acme/hooks -LE_CERTS_DIR=/var/lib/acme/live/$HOSTNAME +LE_CERTS_DIR=/var/lib/acme/live/$H_NAME LE_LOG_DIR=/var/log/letsencrypt POSTGRESQL_CERTDIR=/etc/pki/postgresql POSTGRESQL_KEYFILE=$POSTGRESQL_CERTDIR/postgresql.key