Files
gentoo-overlay/www-apps/authelia-bin/files/authelia.initd
2022-07-26 21:11:48 +02:00

22 lines
838 B
Plaintext

#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
AUTHELIA_USER="${AUTHELIA_USER:-authelia}"
AUTHELIA_GROUP="${AUTHELIA_GROUP:-authelia}"
AUTHELIA_CONFIG="${AUTHELIA_CONFIG:-/etc/authelia/config.yml}"
AUTHELIA_DATA_DIR="${AUTHELIA_DATA_DIR:-/var/lib/authelia}"
AUTHELIA_LOG_DIR="${AUTHELIA_LOG_DIR:-/var/log/authelia}"
command="/usr/bin/authelia"
command_args="--config ${AUTHELIA_CONFIG}"
pidfile="/run/${RC_SVCNAME}.pid"
command_background="true"
start_stop_daemon_args="--user=\"${AUTHELIA_USER}\" --group=\"${AUTHELIA_GROUP}\" --stdout ${AUTHELIA_LOG_DIR}/authelia.log --stderr ${AUTHELIA_LOG_DIR}/authelia.err"
start_pre() {
checkpath -d -o "${AUTHELIA_USER}" -m750 "${AUTHELIA_DATA_DIR}"
checkpath -d -o "${AUTHELIA_USER}" -m750 "${AUTHELIA_LOG_DIR}"
}