www-apps/zitadel-bin: Initial import
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
26
www-apps/zitadel-bin/files/zitadel.initd
Normal file
26
www-apps/zitadel-bin/files/zitadel.initd
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ZITADEL_USER="${ZITADEL_USER:-zitadel}"
|
||||
ZITADEL_GROUP="${ZITADEL_GROUP:-zitadel}"
|
||||
ZITADEL_CONFIG="${ZITADEL_CONFIG:-/etc/zitadel/config.yaml}"
|
||||
ZITADEL_STEPS="${ZITADEL_STEPS:-/etc/zitadel/steps.yaml}"
|
||||
ZITADEL_DATA_DIR="${ZITADEL_DATA_DIR:-/var/lib/zitadel}"
|
||||
ZITADEL_LOG_DIR="${ZITADEL_LOG_DIR:-/var/log/zitadel}"
|
||||
ZITADEL_MASTERKEY_FILE="${ZITADEL_MASTERKEY_FILE:-/etc/zitadel/master.key}"
|
||||
|
||||
command="/usr/bin/zitadel"
|
||||
command_args="start-from-init --config '${ZITADEL_CONFIG}' --steps '${ZITADEL_STEPS}' --masterkeyFile '${ZITADEL_MASTERKEY_FILE}' ${ZITADEL_OPTIONS:-}"
|
||||
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="--user=\"${ZITADEL_USER}\" --group=\"${ZITADEL_GROUP}\" --stdout ${ZITADEL_LOG_DIR}/zitadel.log --stderr ${ZITADEL_LOG_DIR}/zitadel.err"
|
||||
|
||||
start_pre() {
|
||||
checkpath -f -o "${ZITADEL_USER}" -m600 "${ZITADEL_CONFIG}"
|
||||
checkpath -f -o "${ZITADEL_USER}" -m600 "${ZITADEL_STEPS}"
|
||||
checkpath -f -o "${ZITADEL_USER}" -m600 "${ZITADEL_MASTERKEY_FILE}"
|
||||
checkpath -d -o "${ZITADEL_USER}" -m750 "${ZITADEL_DATA_DIR}"
|
||||
checkpath -d -o "${ZITADEL_USER}" -m750 "${ZITADEL_LOG_DIR}"
|
||||
}
|
||||
Reference in New Issue
Block a user