Compare commits

...

2 Commits

Author SHA1 Message Date
joeac e3b3484905 switches to directory for submake file 2026-07-01 16:47:06 +01:00
joeac def393b930 only restart openrc service if one exists on reinstall 2026-07-01 16:47:06 +01:00
2 changed files with 6 additions and 8 deletions
+4 -4
View File
@@ -63,7 +63,7 @@ endef
define install_module_rule = define install_module_rule =
.PHONY: install_$(module) .PHONY: install_$(module)
install_$(module): install_openrc_$(module) $(nginx_module_target) $(dyndns_module_target) $(install_submake_file) install_$(module): install_openrc_$(module) $(nginx_module_target) $(dyndns_module_target) $(install_submake_file)
$(if $(install_submake_file),$(MAKE) --makefile=$(install_submake_file) install) $(if $(install_submake_file),$(MAKE) --makefile=$(notdir $(install_submake_file)) --directory=$(dir $(install_submake_file)) install)
endef endef
define install_openrc_module_rule = define install_openrc_module_rule =
@@ -77,12 +77,12 @@ endef
define reinstall_module_rule = define reinstall_module_rule =
.PHONY: reinstall_$(module) .PHONY: reinstall_$(module)
reinstall_$(module): reinstall_openrc_$(module) $(nginx_module_target) $(dyndns_module_target) $(install_submake_file) reinstall_$(module): reinstall_openrc_$(module) $(nginx_module_target) $(dyndns_module_target) $(install_submake_file)
$(if $(install_submake_file),$(MAKE) --makefile=$(install_submake_file) reinstall) $(if $(install_submake_file),$(MAKE) --makefile=$(notdir $(install_submake_file)) --directory=$(dir $(install_submake_file)) reinstall)
endef endef
define reinstall_openrc_module_rule = define reinstall_openrc_module_rule =
.PHONY: reinstall_openrc_$(module) .PHONY: reinstall_openrc_$(module)
reinstall_openrc_$(module): $(openrc_module_target) openrc_restart_$(module) reinstall_openrc_$(module): $(if $(openrc_module_target),$(openrc_module_target) openrc_restart_$(module))
endef endef
define uninstall_module_rule = define uninstall_module_rule =
@@ -99,7 +99,7 @@ uninstall_$(module):
sudo rm -f /etc/periodic/daily/dyndns-$(SUBDOMAIN_$(module)).joeac.net; \ sudo rm -f /etc/periodic/daily/dyndns-$(SUBDOMAIN_$(module)).joeac.net; \
) )
$(if $(install_submake_file),\ $(if $(install_submake_file),\
$(MAKE) --makefile $(install_submake_file) uninstall $(MAKE) --makefile=$(notdir (install_submake_file)) --directory $(dir $(install_submake_file)) uninstall
) )
endef endef
+2 -4
View File
@@ -1,15 +1,13 @@
LN_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
.PHONY: install .PHONY: install
install: /var/ln.joeac.net/public install: /var/ln.joeac.net/public
.PHONY: reinstall .PHONY: reinstall
reinstall: install reinstall: install
/var/ln.joeac.net/public: $(LN_DIR)/public /var/ln.joeac.net/public: public
sudo rm -rf /var/ln.joeac.net/public sudo rm -rf /var/ln.joeac.net/public
sudo mkdir -p /var/ln.joeac.net/ sudo mkdir -p /var/ln.joeac.net/
sudo cp -r $(LN_DIR)/public/ /var/ln.joeac.net/public/ sudo cp -r public/ /var/ln.joeac.net/public/
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall: