net-im/dendrite: Initial ebuild
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
21
net-im/dendrite/files/dendrite.initd
Normal file
21
net-im/dendrite/files/dendrite.initd
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/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/config.yml}"
|
||||
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}"
|
||||
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="--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}"
|
||||
}
|
||||
Reference in New Issue
Block a user