1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/manticoresearch/manticoresearch.initd
2022-03-22 16:45:54 +01:00

21 lines
570 B
Bash

#!/sbin/openrc-run
# searchd doesn't change user,
# so in order to keep root ownership of pidfile,
# we let openRC manage the daemon's backgrounding.
command="/usr/bin/searchd"
command_user="manticore:manticore"
pidfile="/run/$RC_SVCNAME.pid"
command_args="--nodetach"
command_background="true"
depend() {
use logger
}
start_pre() {
checkpath -d -o $command_user /var/lib/manticore
checkpath -d -o $command_user /var/log/manticore
# This is for the pidfile which searchd creates
# (which isn't used by openrc).
checkpath -d -o $command_user /var/run/manticore
}