diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index ae0da199..228b9eaf 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -128,7 +128,16 @@ BASTILLE_VERSION="0.13.20250126" if [ -z "${BASTILLE_CONFIG}" ]; then BASTILLE_CONFIG=/usr/local/etc/bastille/bastille.conf 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 . /usr/local/share/bastille/common.sh