dags/suricata/acme_refresh/Makefile

23 lines
432 B
Makefile
Raw Normal View History

2023-07-10 15:26:11 +02:00
.PHONY: all
2023-07-12 17:32:23 +02:00
VAULT_TLS=/srv/certs/vault/tls
2023-07-10 15:26:11 +02:00
ACME_DIR=/srv/certs/acme
2023-07-12 16:33:52 +02:00
DOMAIN=vault.monotremata.xyz
2023-07-10 15:26:11 +02:00
CERT_PATH=$(ACME_DIR)/$(DOMAIN)
2023-07-12 16:33:52 +02:00
CERT=$(CERT_PATH)/cert.pem
KEY=$(CERT_PATH)/key.pem
2023-07-10 15:26:11 +02:00
2023-07-12 16:33:52 +02:00
DEST_CERT=$(VAULT_TLS)/tls.crt
DEST_KEY=$(VAULT_TLS)/tls.key
2023-07-10 15:26:11 +02:00
2023-07-12 16:33:52 +02:00
all: $(DEST_CERT) $(DEST_KEY)
2023-07-10 15:26:11 +02:00
2023-07-12 16:33:52 +02:00
$(DEST_CERT): $(CERT)
2023-07-10 15:26:11 +02:00
mkdir -p $(@D)
2023-07-12 12:43:06 +02:00
install -o vault -g vault -m 600 $^ $@
2023-07-10 15:26:11 +02:00
2023-07-12 16:33:52 +02:00
$(DEST_KEY): $(KEY)
2023-07-10 15:26:11 +02:00
mkdir -p $(@D)
2023-07-12 12:43:06 +02:00
install -o vault -g vault -m 600 $^ $@