ubuntu 🙄

This commit is contained in:
f 2020-11-12 12:27:10 -03:00
parent d0c5512525
commit 7d44f1d6e2

View File

@ -19,6 +19,9 @@ domain_tpl ?= templates/domain.tpl
# Make variables available to templates
export
# Detect distribution
include /etc/os-release
# Render templates
templates/%.tpl: templates/%.tpl.in
envsubst < $< > $@
@ -50,6 +53,12 @@ domain/%.crt:
ca: $(ca_key) $(ca_crt) ## Generate the CA keypair
install-ca: $(ca_crt) ## Install the CA on system
ifeq($(ID),ubuntu)
sudo install -Dm 644 $< /usr/share/ca-certificates/extra/sutty.crt
sudo dpkg-reconfigure -a ca-certificates
sudo update-ca-certificates
else
sudo trust anchor $<
endif
all: ca install-ca ## Generate and install
domain: $(domain_key) $(domain_csr) $(domain_crt) ## Issue a site certificate