fix: some file renamings

main
Linux User 2023-05-08 18:17:43 +02:00
parent 543d5e271c
commit 398c42392e
1 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,8 @@ all: sync_certs $(NGINX_RELOAD) $(PROSODY_RELOAD) refresh_pg
ACME_DIR=/srv/certs/acme ACME_DIR=/srv/certs/acme
DOMAIN=monotremata.xyz DOMAIN=monotremata.xyz
CERT_PATH=$(ACME_DIR)/$(DOMAIN) CERT_PATH=$(ACME_DIR)/$(DOMAIN)
CERT=$(CERT_PATH)/fullchain.cer FULLCHAIN=$(CERT_PATH)/fullchain.cer
CERT=$(CERT_PATH)/$(DOMAIN).cer
KEY=$(CERT_PATH)/$(DOMAIN).key KEY=$(CERT_PATH)/$(DOMAIN).key
############################################################################### ###############################################################################
@ -20,14 +21,13 @@ KEY=$(CERT_PATH)/$(DOMAIN).key
# target, it will be run each time, but the certificate files will only be # target, it will be run each time, but the certificate files will only be
# updated if a renewal happens # updated if a renewal happens
$(FULLCHAIN): sync_certs
$(CERT): sync_certs $(CERT): sync_certs
$(KEY): sync_certs $(KEY): sync_certs
RSYNCD_HOST=narwhal RSYNCD_HOST=10.0.24.106
RSYNCD_USER=user RSYNCD_USER=user
RSYNCD_PASSWORD=/srv/secrets/rsyncd_password
GOPASS=doas -u gopass gopass
RSYNC_PASSWORD = $(shell $(GOPASS) $(RSYNCD_HOST)/rsyncd/$(RSYNCD_USER))
REMOTE_ACME_PATH=rsync://$(RSYNCD_USER)@$(RSYNCD_HOST)/acme REMOTE_ACME_PATH=rsync://$(RSYNCD_USER)@$(RSYNCD_HOST)/acme
RSYNC_OPTS=--archive --delete --acls --xattrs --compress --verbose --human-readable RSYNC_OPTS=--archive --delete --acls --xattrs --compress --verbose --human-readable
@ -35,8 +35,8 @@ RSYNC_OPTS=--archive --delete --acls --xattrs --compress --verbose --human-reada
sync_certs: sync_certs:
mkdir -p $(ACME_DIR) mkdir -p $(ACME_DIR)
@echo "running rsync" @echo "running rsync"
@export RSYNC_PASSWORD=$(RSYNC_PASSWORD); \
rsync \ rsync \
--password-file $(RSYNCD_PASSWORD) \
$(RSYNC_OPTS) \ $(RSYNC_OPTS) \
$(REMOTE_ACME_PATH) \ $(REMOTE_ACME_PATH) \
$(ACME_DIR) $(ACME_DIR)
@ -51,7 +51,7 @@ sync_certs:
NGINX_COMPOSE_FILE=/srv/services/www/docker-compose.yml NGINX_COMPOSE_FILE=/srv/services/www/docker-compose.yml
$(NGINX_RELOAD): $(MONOTREMATA_CERT) $(MONOTREMATA_KEY) $(NGINX_RELOAD): $(FULLCHAIN) $(KEY)
mkdir -p $(@D) mkdir -p $(@D)
docker-compose \ docker-compose \
--file $(NGINX_COMPOSE_FILE) \ --file $(NGINX_COMPOSE_FILE) \
@ -69,7 +69,7 @@ PROSODY_KEY=$(PROSODY_CERTS_PATH)/monotremata.xyz.key
PROSODY_UID=101 PROSODY_UID=101
PROSODY_GID=102 PROSODY_GID=102
$(PROSODY_CERT): $(CERT) $(PROSODY_CERT): $(FULLCHAIN)
install -o $(PROSODY_UID) -g $(PROSODY_GID) -m 644 $< $@ install -o $(PROSODY_UID) -g $(PROSODY_GID) -m 644 $< $@
$(PROSODY_KEY): $(KEY) $(PROSODY_KEY): $(KEY)