#!/sbin/openrc-run # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 DENDRITE_USER="${DENDRITE_USER:-dendrite}" DENDRITE_GROUP="${DENDRITE_GROUP:-dendrite}" DENDRITE_CONFIG="${DENDRITE_CONFIG:-/etc/dendrite/dendrite.yaml}" DENDRITE_DATA_DIR="${DENDRITE_DATA_DIR:-/var/lib/dendrite}" DENDRITE_LOG_DIR="${DENDRITE_LOG_DIR:-/var/log/dendrite}" command="/usr/bin/dendrite" command_args="-config ${DENDRITE_CONFIG} -logtostderr" pidfile="/run/${RC_SVCNAME}.pid" command_background="true" start_stop_daemon_args="--cd=\"${DENDRITE_DATA_DIR}\" --user=\"${DENDRITE_USER}\" --group=\"${DENDRITE_GROUP}\" --stdout ${DENDRITE_LOG_DIR}/dendrite.log --stderr ${DENDRITE_LOG_DIR}/dendrite.err" start_pre() { checkpath -d -o "${DENDRITE_USER}" -m750 "${DENDRITE_DATA_DIR}" checkpath -d -o "${DENDRITE_USER}" -m750 "${DENDRITE_LOG_DIR}" }