diff options
| author | Joe Carstairs <me@joeac.net> | 2026-07-01 17:33:53 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-07-01 17:33:53 +0100 |
| commit | d0f549ce22dc72f1312fe84814639f2064d15f81 (patch) | |
| tree | 098a4b927b63c59ca8e1cc080d1fc7b7779ebd32 | |
| parent | 89165e9d889f3dc0a0a40290fad21b6ffbaa3782 (diff) | |
removes unneeded nginx vars in Makefiles
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | nginx.mk | 18 | ||||
| -rw-r--r-- | nginx_module.mk | 4 |
3 files changed, 11 insertions, 15 deletions
@@ -15,10 +15,6 @@ COMPOSE_SERVICES := $(shell podman-compose config \ | yq ".services | keys" --output-format csv --csv-separator " ") MAKE_MODULES := $(foreach module,$(MODULES),\ $(shell [ -f $(module)/Makefile ] && echo $(module))) -NGINX_CONFIG_SRC := nginx/nginx.conf -NGINX_CONFIG := /etc/nginx/nginx.conf -NGINX_CONFIG_BACKUP := /etc/nginx/nginx.joeac.net-backup -RESTART_NGINX := sudo rc-service nginx restart ############# @@ -1,21 +1,21 @@ .PHONY: install_nginx -install_nginx: $(NGINX_CONFIG_BACKUP) $(NGINX_CONFIG) +install_nginx: /etc/nginx/nginx.joeac.net-backup /etc/nginx/nginx.conf .PHONY: reinstall_nginx -reinstall_nginx: $(NGINX_CONFIG_BACKUP) $(NGINX_CONFIG) +reinstall_nginx: /etc/nginx/nginx.joeac.net-backup /etc/nginx/nginx.conf .PHONY: uninstall_nginx uninstall_nginx: uninstall_dyndns -ifeq ($(shell test -d $(NGINX_CONFIG_BACKUP) && echo 1 || echo 0),0) +ifeq ($(shell test -d /etc/nginx/nginx.joeac.net-backup && echo 1 || echo 0),0) $(warn No nginx backup config detected: doing nothing) else - sudo mv $(NGINX_CONFIG_BACKUP) $(NGINX_CONFIG) - $(RESTART_NGINX) + sudo mv /etc/nginx/nginx.joeac.net-backup /etc/nginx/nginx.conf + sudo rc-service nginx restart endif -$(NGINX_CONFIG_BACKUP): - sudo mv $(NGINX_CONFIG) $(NGINX_CONFIG_BACKUP) +/etc/nginx/nginx.joeac.net-backup: + sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.joeac.net-backup -$(NGINX_CONFIG): $(NGINX_CONFIG_SRC) $(NGINX_CONFIG_BACKUP) +/etc/nginx/nginx.conf: nginx/nginx.conf /etc/nginx/nginx.joeac.net-backup sudo cp $< $@ - $(RESTART_NGINX) + sudo rc-service nginx restart diff --git a/nginx_module.mk b/nginx_module.mk index 0b1a2c5..949421d 100644 --- a/nginx_module.mk +++ b/nginx_module.mk @@ -16,9 +16,9 @@ endef $(foreach module,$(MODULES),$(eval $(install_nginx_module_rule))) -/etc/nginx/http.d/%.joeac.net.conf: nginx/http.d/%.joeac.net.conf /etc/nginx/http.d $(NGINX_CONFIG) +/etc/nginx/http.d/%.joeac.net.conf: nginx/http.d/%.joeac.net.conf /etc/nginx/http.d /etc/nginx/nginx.conf sudo cp $< $@ - $(RESTART_NGINX) + sudo rc-service nginx restart /etc/nginx/http.d: sudo mkdir -p /etc/nginx/http.d |
