pulls out nginx_module.mk

This commit is contained in:
2026-07-01 17:22:50 +01:00
parent fa4d275cc0
commit a601e93d00
3 changed files with 26 additions and 10 deletions
+24
View File
@@ -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