bastille: Load config if set in ENV

This commit is contained in:
tschettervictor
2025-03-01 22:00:06 -07:00
committed by GitHub
parent 58cb2ccdf7
commit 9c1fa6eb91

View File

@@ -128,7 +128,16 @@ BASTILLE_VERSION="0.13.20250126"
if [ -z "${BASTILLE_CONFIG}" ]; then if [ -z "${BASTILLE_CONFIG}" ]; then
BASTILLE_CONFIG=/usr/local/etc/bastille/bastille.conf BASTILLE_CONFIG=/usr/local/etc/bastille/bastille.conf
export BASTILLE_CONFIG export BASTILLE_CONFIG
fi elif [ -r "${BASTILLE_CONFIG}" ]; then
info "Using custom config: ${BASTILLE_CONFIG}"
export BASTILLE_CONFIG
elif [ -r "/usr/local/etc/bastille/${BASTILLE_CONFIG}" ]; then
BASTILLE_CONFIG="/usr/local/etc/bastille/${BASTILLE_CONFIG}"
info "Using custom config: ${BASTILLE_CONFIG}"
export BASTILLE_CONFIG
else
error_exit "Not a valid config file: ${BASTILLE_CONFIG}"
fi
# Load common.sh after setting BASTILLE_CONFIG # Load common.sh after setting BASTILLE_CONFIG
. /usr/local/share/bastille/common.sh . /usr/local/share/bastille/common.sh