diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:05:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:05:26 +0100 |
commit | 7b6779967898bf86cb9670457223f4237816a205 (patch) | |
tree | 2d2bf1b6b4222730e0e1e877b8038e2ae2eefbec /app-admin/graylog2/files/initd-r2 | |
parent | 83c20bc401b9e577248523c6555493e36a100a41 (diff) |
gentoo resync : 14.07.2018 (2nd step)
Diffstat (limited to 'app-admin/graylog2/files/initd-r2')
-rw-r--r-- | app-admin/graylog2/files/initd-r2 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app-admin/graylog2/files/initd-r2 b/app-admin/graylog2/files/initd-r2 new file mode 100644 index 000000000000..c6177eef41d0 --- /dev/null +++ b/app-admin/graylog2/files/initd-r2 @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# 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" + +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/contentpacks" \ + "${GRAYLOG_DATA_DIR}/data/journal" \ + "${GRAYLOG_LOG_DIR}"; do + + checkpath -d -o "${GRAYLOG_USER}":"${GRAYLOG_GROUP}" -m750 "${d}" + done +} |