diff --git a/fugu/acme_rsync/Makefile b/fugu/acme_refresh/Makefile similarity index 57% rename from fugu/acme_rsync/Makefile rename to fugu/acme_refresh/Makefile index 00f63cf..97ea994 100644 --- a/fugu/acme_rsync/Makefile +++ b/fugu/acme_refresh/Makefile @@ -1,15 +1,14 @@ # Note: since I am assuming GNU Make and this host runs OpenBSD, remember to # run this dag using `gmake` instead of `make` -WD=/var/lib/dags/acme_rsync +WD=/var/lib/dags/acme_refresh SMTPD_RESTART=$(WD)/smtpd_restart DOVECOT_RELOAD=$(WD)/dovecot_reload -SYNC_CERTS=$(WD)/sync_certs -.PHONY: all sync_certs +.PHONY: all -all: sync_certs $(SMTPD_RESTART) $(DOVECOT_RELOAD) +all: $(SMTPD_RESTART) $(DOVECOT_RELOAD) ############################################################################### @@ -20,31 +19,6 @@ CERT_PATH=$(ACME_DIR)/$(DOMAIN) CERT=$(CERT_PATH)/fullchain.cer KEY=$(CERT_PATH)/$(DOMAIN).key -############################################################################### -# Sync the certificates using rsync. Because `sync` is a phony -# target, it will be run each time, but the certificate files will only be -# updated if a renewal happens - -$(CERT): $(SYNC_CERTS) -$(KEY): $(SYNC_CERTS) - -RSYNCD_HOST=10.0.24.106 -RSYNCD_USER=user -RSYNCD_PASSWORD=/srv/secrets/rsyncd_password - -REMOTE_ACME_PATH=rsync://$(RSYNCD_USER)@$(RSYNCD_HOST)/acme -RSYNC_OPTS=--archive --delete --compress --verbose --human-readable - -sync_certs: - mkdir -p $(ACME_DIR) - @echo "running rsync" - @export RSYNC_PASSWORD=$(RSYNC_PASSWORD); \ - rsync \ - --password-file $(RSYNCD_PASSWORD) \ - $(RSYNC_OPTS) \ - $(REMOTE_ACME_PATH) \ - $(ACME_DIR) - ############################################################################### SSL_PATH=/etc/ssl diff --git a/fugu/acme_rsync/run.sh b/fugu/acme_refresh/run.sh similarity index 100% rename from fugu/acme_rsync/run.sh rename to fugu/acme_refresh/run.sh