feature: added installation command and service files

This commit is contained in:
frosty
2026-03-16 22:26:00 -04:00
parent 916c815b08
commit 0317ff26d5
8 changed files with 158 additions and 2 deletions

19
init/openrc/omnisearch Executable file
View File

@@ -0,0 +1,19 @@
#!/sbin/openrc-run
name=omnisearch
description="Omnisearch Web Search Server"
command="/usr/bin/omnisearch"
command_background=yes
pidfile="/run/${RC_SVCNAME}.pid"
output_log="/var/log/omnisearch/omnisearch.log"
error_log="/var/log/omnisearch/omnisearch.err"
user=omnisearch
group=omnisearch
directory=/etc/omnisearch
respawn_delay=5
respawn_max=10
depend() {
need net
after firewall
}

2
init/runit/log/run Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
exec chpst -u omnisearch:omnisearch svlogd -tt /var/log/omnisearch

2
init/runit/run Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
exec chpst -u omnisearch:omnisearch /usr/bin/omnisearch 2>&1

2
init/s6/log/run Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/execlineb -P
exec -c chpst -u omnisearch:omnisearch s6-log -d 3 /var/log/omnisearch

3
init/s6/run Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/execlineb -P
foreground { s6-setsid -g }
exec -c chpst -u omnisearch:omnisearch /usr/bin/omnisearch

View File

@@ -0,0 +1,17 @@
[Unit]
Description=Omnisearch Web Search Server
After=network.target
[Service]
Type=simple
User=omnisearch
Group=omnisearch
WorkingDirectory=/etc/omnisearch
ExecStart=/usr/bin/omnisearch
Restart=always
RestartSec=5
PrivateTmp=yes
NoNewPrivileges=yes
[Install]
WantedBy=multi-user.target