diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-12 17:21:13 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-12 17:21:13 +0100 |
| commit | 4c3a68b72fd91a85a332161b9cf181566cef9289 (patch) | |
| tree | 0397c48e8825fdd3320899698e0d5a611b09afbe /make/openrc.mk | |
| parent | 4f8d16ebcb16811d6a7a95d659be7e138d2713ef (diff) | |
remove remaining make stuff
Diffstat (limited to 'make/openrc.mk')
| -rw-r--r-- | make/openrc.mk | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/make/openrc.mk b/make/openrc.mk deleted file mode 100644 index 207c71b..0000000 --- a/make/openrc.mk +++ /dev/null @@ -1,74 +0,0 @@ -is_openrc_module = $(filter $(COMPOSE_SERVICES),$(module)) -openrc_module_target = $(if $(is_openrc_module),~/.config/rc/init.d/joeac.net.$(module)) - -define install_openrc_module_rule = -.PHONY: install_openrc_$(module) -install_openrc_$(module): $(if $(is_openrc_module),$(openrc_module_target) openrc_add_$(module) openrc_start_$(module)) - -~/.config/rc/init.d/joeac.net.$(module): ~/.config/rc/init.d/joeac.net ~/.config/rc/runlevels/default - rm -f ~/.config/rc/init.d/joeac.net.$(module) - ln -s $(shell realpath ~)/.config/rc/init.d/joeac.net ~/.config/rc/init.d/joeac.net.$(module) -endef - -define reinstall_openrc_module_rule = -.PHONY: reinstall_openrc_$(module) -reinstall_openrc_$(module): $(if $(is_openrc_module),$(openrc_module_target) openrc_restart_$(module)) -endef - -define uninstall_openrc_module_rule = -.PHONY: uninstall_openrc_$(module) -uninstall_openrc_$(module): - $(if $(is_openrc_module),\ - rc-service -U joeac.net.$(module) stop; \ - rc-update -U del joeac.net.$(module) default; \ - rm -f ~/.config/rc/init.d/joeac.net.$(module); \ - ) -endef - -define openrc_add_rule = -.PHONY: openrc_add_$(module) -openrc_add_$(module): - rc-update -U add joeac.net.$(module) default -endef - -define openrc_start_rule = -.PHONY: openrc_start_$(module) -openrc_start_$(module): - rc-service -U joeac.net.$(module) start -endef - -define openrc_restart_rule = -.PHONY: openrc_restart_$(module) -openrc_restart_$(module): - rc-service -U joeac.net.$(module) restart -endef - -$(foreach module,$(ALL_MODULES),$(eval $(install_openrc_module_rule))) -$(foreach module,$(ALL_MODULES),$(eval $(reinstall_openrc_module_rule))) -$(foreach module,$(ALL_MODULES),$(eval $(uninstall_openrc_module_rule))) -$(foreach module,$(ALL_MODULES),$(eval $(openrc_add_rule))) -$(foreach module,$(ALL_MODULES),$(eval $(openrc_start_rule))) -$(foreach module,$(MODULES),$(eval $(openrc_restart_rule))) - -~/.config/rc/init.d/joeac.net: openrc/init.d/joeac.net.template ~/.config/rc/init.d ~/.config/rc/runlevels/default /etc/init.d/user.$(USER) /etc/conf.d/user.$(USER) - rm -f ~/.config/rc/init.d/joeac.net; \ - mkdir -p ~/.config/rc/init.d; \ - COMPOSECMD="$(COMPOSE_CMD)" envsubst -i openrc/init.d/joeac.net.template -o ~/.config/rc/init.d/joeac.net - chmod +x ~/.config/rc/init.d/joeac.net - -~/.config/rc/init.d: - mkdir -p ~/.config/rc/init.d - -~/.config/rc/runlevels/default: - mkdir -p ~/.config/rc/runlevels/default - -/etc/init.d/user.$(USER): - sudo ln -s /etc/init.d/user /etc/init.d/user.$(USER) - -/etc/conf.d/user.$(USER): openrc/conf.d/user.template - USER=$(USER) envsubst -i openrc/conf.d/user.template -o openrc/conf.d/user.$(USER) - sudo mv openrc/conf.d/user.$(USER) /etc/conf.d/user.$(USER) - sudo rc-update add user.$(USER) default - -.PHONY: uninstall_joeac.net_service - rm ~/.config/rc/joeac.net |
