diff options
| author | crumpetalpaca <crumpet@crumpetalpaca.xyz> | 2026-03-28 09:57:27 +0000 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-03-28 19:36:36 -0400 |
| commit | ebdbbc2ff0f412046a7cf1299825b24489feae8d (patch) | |
| tree | 07a0e60fb3ee76be2829e102bf77b2a0805d2d6d /Makefile | |
| parent | 82075a664e181c0a6a064ad7767d43d294db580a (diff) | |
| download | omnisearch-ebdbbc2ff0f412046a7cf1299825b24489feae8d.tar.gz | |
fix: Make it so runit users specify services directory
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -76,6 +76,7 @@ USER := omnisearch GROUP := omnisearch SYSTEMD_DIR := /etc/systemd/system +RUNIT_DIR ?= $(error Please set RUNIT_DIR to your services directory) OPENRC_DIR := /etc/init.d DINIT_DIR := /etc/dinit.d LAUNCHD_DIR ?= /Library/LaunchDaemons @@ -151,7 +152,7 @@ install-openrc: $(TARGET) @echo "Run 'rc-update add omnisearch default' to enable" install-runit: $(TARGET) - @mkdir -p $(DATA_DIR)/templates $(DATA_DIR)/static $(LOG_DIR) $(CACHE_DIR) /etc/service/omnisearch/log/ + @mkdir -p $(DATA_DIR)/templates $(DATA_DIR)/static $(LOG_DIR) $(CACHE_DIR) $(RUNIT_DIR)/omnisearch/log/ @cp -rf templates/* $(DATA_DIR)/templates/ @cp -rf static/* $(DATA_DIR)/static/ @cp -n example-config.ini $(DATA_DIR)/config.ini || true @@ -161,15 +162,15 @@ install-runit: $(TARGET) @id -u $(USER) >/dev/null 2>&1 || useradd --system --home $(DATA_DIR) --shell /usr/sbin/nologin -g $(GROUP) $(USER) @chown -R $(USER):$(GROUP) $(LOG_DIR) $(CACHE_DIR) $(VAR_DIR) $(DATA_DIR) 2>/dev/null || true @chown $(USER):$(GROUP) $(DATA_DIR)/config.ini 2>/dev/null || true - install -m 755 init/runit/run /etc/service/omnisearch/run - install -m 755 init/runit/log/run /etc/service/omnisearch/log/run + install -m 755 init/runit/run $(RUNIT_DIR)/omnisearch/run + install -m 755 init/runit/log/run $(RUNIT_DIR)/omnisearch/log/run @echo "" @echo "Config: $(DATA_DIR)/config.ini" @echo "Edit config with: nano $(DATA_DIR)/config.ini" - @echo "Installed runit service to /etc/service/omnisearch" + @echo "Installed runit service to $(RUNIT_DIR)/omnisearch" @echo "You need to start the service manually" - @echo "Void: ln -s /etc/service/omnisearch/ /var/service" - @echo "Artix: ln -s /etc/service/omnisearch/ /run/runit/" + @echo "Void: ln -s $(RUNIT_DIR)/omnisearch/ /var/service/" + @echo "Artix: ln -s $(RUNIT_DIR)/omnisearch/ /run/runit/" install-s6: $(TARGET) @mkdir -p $(DATA_DIR)/templates $(DATA_DIR)/static $(LOG_DIR) $(CACHE_DIR) @@ -218,6 +219,7 @@ uninstall: rm -f $(DINIT_DIR)/omnisearch rm -rf /etc/service/omnisearch rm -rf /var/service/omnisearch + @echo "You might need to unlink omnisearch if you're using runit" @id -u $(USER) >/dev/null 2>&1 && userdel $(USER) 2>/dev/null || true @grep -q '^$(GROUP):' /etc/group 2>/dev/null && groupdel $(GROUP) 2>/dev/null || true @echo "Uninstalled omnisearch" |
