Fix runit script

This commit is contained in:
crumpetalpaca
2026-03-18 12:00:36 +00:00
committed by frosty
parent f17171d3e1
commit a58fdc7c0f
3 changed files with 10 additions and 8 deletions

View File

@@ -151,7 +151,7 @@ install-openrc: $(TARGET)
@echo "Run 'rc-update add omnisearch default' to enable" @echo "Run 'rc-update add omnisearch default' to enable"
install-runit: $(TARGET) install-runit: $(TARGET)
@mkdir -p $(DATA_DIR)/templates $(DATA_DIR)/static $(LOG_DIR) $(CACHE_DIR) @mkdir -p $(DATA_DIR)/templates $(DATA_DIR)/static $(LOG_DIR) $(CACHE_DIR) /etc/service/omnisearch/log/
@cp -rf templates/* $(DATA_DIR)/templates/ @cp -rf templates/* $(DATA_DIR)/templates/
@cp -rf static/* $(DATA_DIR)/static/ @cp -rf static/* $(DATA_DIR)/static/
@cp -n example-config.ini $(DATA_DIR)/config.ini || true @cp -n example-config.ini $(DATA_DIR)/config.ini || true
@@ -161,15 +161,15 @@ install-runit: $(TARGET)
@id -u $(USER) >/dev/null 2>&1 || useradd --system --home $(DATA_DIR) --shell /usr/sbin/nologin -g $(GROUP) $(USER) @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 -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 @chown $(USER):$(GROUP) $(DATA_DIR)/config.ini 2>/dev/null || true
@mkdir -p /etc/service/omnisearch/log/supervise/control
install -m 755 init/runit/run /etc/service/omnisearch/run 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/log/run /etc/service/omnisearch/log/run
install -m 755 init/runit/log/run /etc/service/omnisearch/log/supervise/control
@echo "" @echo ""
@echo "Config: $(DATA_DIR)/config.ini" @echo "Config: $(DATA_DIR)/config.ini"
@echo "Edit config with: nano $(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 /etc/service/omnisearch"
@echo "Service will start automatically" @echo "You need to start the service manually"
@echo "Void: ln -s /etc/service/omnisearch/ /var/service"
@echo "Artix: Idk I don't use artix -crumpet"
install-s6: $(TARGET) install-s6: $(TARGET)
@mkdir -p $(DATA_DIR)/templates $(DATA_DIR)/static $(LOG_DIR) $(CACHE_DIR) @mkdir -p $(DATA_DIR)/templates $(DATA_DIR)/static $(LOG_DIR) $(CACHE_DIR)

View File

@@ -1,2 +1,3 @@
#!/bin/sh #!/bin/sh -e
exec chpst -u omnisearch:omnisearch svlogd -tt /var/log/omnisearch exec 2>&1
exec chpst -u omnisearch:omnisearch svlogd -ttt /var/log/omnisearch/

View File

@@ -1,3 +1,4 @@
#!/bin/sh #!/bin/sh
cd /etc/omnisearch exec 2>&1
exec chpst -u omnisearch:omnisearch /usr/bin/omnisearch cd /etc/omnisearch/
exec chpst -u omnisearch:omnisearch /usr/bin/omnisearch