blob: ac72c2bb203851fe85fa496ac6acfb7c765bc92d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/sbin/openrc-run
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
}
description="SearXNG metasearch engine"
: ${SEARXNG_USER:=searxng}
: ${SEARXNG_GROUP:=searxng}
: ${SEARXNG_HOME:=/var/lib/searxng}
: ${SEARXNG_LOG:=/var/log/searxng/searxng.log}
command="/usr/bin/searxng-run"
pidfile="/run/searxng/searxng.pid"
retry="TERM/5/KILL/5"
start_pre() {
checkpath -d -m 0755 -o "${SEARXNG_USER}:${SEARXNG_GROUP}" /run/searxng
checkpath -d -m 0750 -o "${SEARXNG_USER}:${SEARXNG_GROUP}" /var/log/searxng
checkpath -f -m 0640 -o "${SEARXNG_USER}:${SEARXNG_GROUP}" "${SEARXNG_LOG}"
}
start() {
ebegin "Starting SearXNG"
start-stop-daemon --start \
--pidfile "${pidfile}" \
--user "${SEARXNG_USER}:${SEARXNG_GROUP}" \
--background \
--make-pidfile \
--exec "${command}" \
--stderr "${SEARXNG_LOG}"
eend $?
}
|