dags/lb/acme_refresh/Makefile

41 lines
1.1 KiB
Makefile
Raw Normal View History

2023-05-30 17:37:05 +02:00
WD=/var/lib/dags/acme_refresh
###############################################################################
2023-06-02 17:59:00 +02:00
ACME_DIR=/etc/nginx/acme
2023-08-18 17:28:31 +02:00
2023-05-30 17:37:05 +02:00
DOMAIN=monotremata.xyz
2023-08-18 17:28:31 +02:00
2023-05-30 17:37:05 +02:00
CERT_PATH=$(ACME_DIR)/$(DOMAIN)
2023-08-18 17:28:31 +02:00
FULLCHAIN=$(CERT_PATH)/fullchain.pem
CERT=$(CERT_PATH)/cert.pem
KEY=$(CERT_PATH)/key.pem
CUINA_CERT_PATH=$(ACME_DIR)/cuina.$(DOMAIN)
CUINA_FULLCHAIN=$(CUINA_CERT_PATH)/fullchain.pem
CUINA_CERT=$(CUINA_CERT_PATH)/cert.pem
CUINA_KEY=$(CUINA_CERT_PATH)/key.pem
2023-05-30 17:37:05 +02:00
APKOVL=/media/mmcblk0p2/lb.apkovl.tar.gz
NGINX_RELOAD=$(WD)/nginx_reload
###############################################################################
.PHONY: all
all: $(NGINX_RELOAD) $(APKOVL)
2023-05-30 17:37:05 +02:00
###############################################################################
2023-08-18 17:28:31 +02:00
$(NGINX_RELOAD): $(FULLCHAIN) $(CERT) $(KEY) $(CUINA_FULLCHAIN) $(CUINA_CERT) $(CUINA_KEY)
mkdir -p $(@)
nginx -s reload
touch $@
2023-08-18 17:28:31 +02:00
$(APKOVL): $(FULLCHAIN) $(CERT) $(KEY) $(CUINA_FULLCHAIN) $(CUINA_CERT) $(CUINA_KEY)
lbu add $(CERT_PATH) $(CUINA_CERT_PATH)
2023-05-30 17:37:05 +02:00
lbu commit
###############################################################################