diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
commit | 590b9b7b03bf4651e099949e318755af7cfa81b8 (patch) | |
tree | 54c184b7d26c25f1922bfeaf19a1dd45a2e3b1eb /www-apps/kibana-bin/files/kibana.initd-r1 | |
parent | f4fc10428424904caf2035cffc442195cb088b2c (diff) |
gentoo resync : 01.08.2021
Diffstat (limited to 'www-apps/kibana-bin/files/kibana.initd-r1')
-rw-r--r-- | www-apps/kibana-bin/files/kibana.initd-r1 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/www-apps/kibana-bin/files/kibana.initd-r1 b/www-apps/kibana-bin/files/kibana.initd-r1 new file mode 100644 index 000000000000..124cb683c939 --- /dev/null +++ b/www-apps/kibana-bin/files/kibana.initd-r1 @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +KIBANA_USER="${KIBANA_USER:-kibana}" +KIBANA_CONFIG="${KIBANA_CONFIG:-/etc/kibana/kibana.yml}" +KIBANA_CACHE_DIR="${KIBANA_CACHE_DIR:-/var/cache/kibana}" +KIBANA_BABEL_CACHE_PATH="${KIBANA_CACHE_DIR}/.babelcache.json" +KIBANA_DATA_DIR="${KIBANA_DATA_DIR:-/var/lib/kibana}" +KIBANA_LOG_DIR="${KIBANA_LOG_DIR:-/var/log/kibana}" + +command="/opt/kibana/bin/kibana" +command_args="--elasticsearch ${ES_INSTANCE} --config ${KIBANA_CONFIG} --path.data=${KIBANA_DATA_DIR}" +command_user="${KIBANA_USER}" +error_log="${KIBANA_LOG_DIR}/kibana.err" +output_log="${KIBANA_LOG_DIR}/kibana.log" + +pidfile="/run/${RC_SVCNAME}.pid" +command_background="true" +start_stop_daemon_args="--env BABEL_CACHE_PATH=${KIBANA_BABEL_CACHE_PATH}" + +start_pre() { + checkpath -d -o "${KIBANA_USER}" -m750 "${KIBANA_CACHE_DIR}" + checkpath -d -o "${KIBANA_USER}" -m750 "${KIBANA_DATA_DIR}" + checkpath -d -o "${KIBANA_USER}" -m750 "${KIBANA_LOG_DIR}" +} + +stop() { + ebegin "Stopping ${SVCNAME}" + + pkill -P $(cat "${pidfile}") + pwait -F "${pidfile}" +} |