From 610bd202af6c82dc51391943fdb9c2634e6a56dc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 27 Feb 2014 18:08:09 -0800 Subject: [PATCH] x.509/Makefile-{link,server}: Allow users to override FQDNS By using ?= to assign that variable only if it's not already set [1]. For Makefile-link, also append the 'nginx' entry using += [2], to ensure it is always present. [1]: https://www.gnu.org/software/make/manual/html_node/Setting.html [2]: https://www.gnu.org/software/make/manual/html_node/Appending.html --- x.509/Makefile-link | 3 ++- x.509/Makefile-server | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/x.509/Makefile-link b/x.509/Makefile-link index c73b4b7..7fe799a 100644 --- a/x.509/Makefile-link +++ b/x.509/Makefile-link @@ -9,11 +9,12 @@ DOMAIN ?= example.com HOSTS ?= www static media kibana es +FQDNS ?= $(patsubst %, %.$(DOMAIN), $(HOSTS)) +FQDNS += nginx WILDCARD_KEY ?= /etc/ssl/$(DOMAIN)/wildcard.$(DOMAIN).key WILDCARD_CERT_CHAIN ?= /etc/ssl/$(DOMAIN)/wildcard.$(DOMAIN)-chain.crt -FQDNS = $(patsubst %, %.$(DOMAIN), $(HOSTS)) nginx KEYS = $(patsubst %, %.key, $(FQDNS)) CERTS = $(patsubst %, %.pem, $(FQDNS)) diff --git a/x.509/Makefile-server b/x.509/Makefile-server index 247a55c..a43474d 100644 --- a/x.509/Makefile-server +++ b/x.509/Makefile-server @@ -12,11 +12,11 @@ ORGANIZATION ?= Example, Inc. DOMAIN ?= example.com HOSTS ?= www static media kibana es DEFAULT ?= www.$(DOMAIN) +FQDNS ?= $(patsubst %, %.$(DOMAIN), $(HOSTS)) CA_KEY ?= /etc/ssl/ca/key.pem CA_CERT ?= /etc/ssl/ca/ca.pem -FQDNS = $(patsubst %, %.$(DOMAIN), $(HOSTS)) KEYS = $(patsubst %, %.key, $(FQDNS)) CERTS = $(patsubst %, %.cert, $(FQDNS)) CHAINED_CERTS = $(patsubst %, %.pem, $(FQDNS)) -- 2.26.2