diff options
| author | Joe Carstairs <me@joeac.net> | 2026-07-01 17:22:50 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-07-01 17:22:50 +0100 |
| commit | a601e93d00ba635cca832902935966e5896f8f14 (patch) | |
| tree | 47f5db03d94f891671ec83097929e6338d5ac8fc /nginx_module.mk | |
| parent | fa4d275cc01c4eb154d0172f45533ee6b001750c (diff) | |
pulls out nginx_module.mk
Diffstat (limited to 'nginx_module.mk')
| -rw-r--r-- | nginx_module.mk | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nginx_module.mk b/nginx_module.mk new file mode 100644 index 0000000..0b1a2c5 --- /dev/null +++ b/nginx_module.mk @@ -0,0 +1,24 @@ +define install_nginx_module_rule = +.PHONY: install_nginx_module_rule +install_nginx_module_rule: $(if $(SUBDOMAIN_$(module)),/etc/nginx/http.d/$(SUBDOMAIN_$(module)).joeac.net.conf) +endef + +define reinstall_nginx_module_rule = +.PHONY: reinstall_nginx_module_rule +reinstall_nginx_module_rule: $(if $(SUBDOMAIN_$(module)),/etc/nginx/http.d/$(SUBDOMAIN_$(module)).joeac.net.conf) +endef + +define uninstall_nginx_module_rule = +.PHONY: uninstall_nginx_module_rule +uninstall_nginx_module_rule: + $(if $(SUBDOMAIN_$(module)),rm -f /etc/nginx/http.d/$(SUBDOMAIN_$(module)).joeac.net.conf) +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) + sudo cp $< $@ + $(RESTART_NGINX) + +/etc/nginx/http.d: + sudo mkdir -p /etc/nginx/http.d |
