Update authelia startup script / service file

Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
2022-07-26 21:11:48 +02:00
parent 91f319a72e
commit bd07a79a1e
5 changed files with 37 additions and 43 deletions

View File

@@ -0,0 +1,21 @@
#!/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}"
}

View File

@@ -1,10 +1,18 @@
[Unit]
Description=Authelia authentication and authorization server
After=multi-user.target
Description=Authelia Web Application
After=network.target
[Service]
ExecStart=/usr/bin/authelia --config /etc/authelia/configuration.yml
SyslogIdentifier=authelia
WorkingDirectory=/var/lib/authelia
StateDirectory=authelia
StateDirectoryMode=0750
CacheDirectory=authelia
CacheDirectoryMode=0750
User=authelia
Group=authelia
ExecStart=/usr/bin/authelia --config /etc/authelia/config.yml
[Install]
WantedBy=multi-user.target