Files
gentoo/app-admin/graylog/files/graylog.initd
Tomáš Mózes 5b99a2ab95 app-admin/graylog: bump to 3.3.8
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
2020-11-10 16:29:46 +01:00

32 lines
836 B
Plaintext

#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/usr/bin/java"
command_args="${JAVA_OPTS} -jar ${GRAYLOG_INSTALL_DIR}/graylog.jar server -f ${GRAYLOG_CONFIG_FILE} --no-pid-file ${GRAYLOG_OPTIONS}"
command_background="true"
command_user="${GRAYLOG_USER}:${GRAYLOG_GROUP}"
pidfile="/run/${RC_SVCNAME}.pid"
retry="30"
output_log="${GRAYLOG_LOG_DIR}/graylog.stdout.log"
error_log="${GRAYLOG_LOG_DIR}/graylog.stderr.log"
directory="${GRAYLOG_INSTALL_DIR}"
required_files="${GRAYLOG_CONFIG_FILE}"
depend() {
use dns
}
start_pre() {
local d
for d in \
"${GRAYLOG_DATA_DIR}" \
"${GRAYLOG_DATA_DIR}/data" \
"${GRAYLOG_DATA_DIR}/data/journal" \
"${GRAYLOG_LOG_DIR}"; do
checkpath -d -o "${GRAYLOG_USER}":"${GRAYLOG_GROUP}" -m750 "${d}"
done
}