From c8e0cc0a78f41d15eeb501a25de29121f93ce314 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Wed, 16 Apr 2025 16:24:05 -0600 Subject: [PATCH] fix BASTILLE_CONFIG var --- usr/local/bin/bastille | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index 5a9dffc7..12de3d5d 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -128,14 +128,16 @@ bastille_conf_check bastille_perms_check if [ -z "${BASTILLE_CONFIG}" ]; then - BASTILLE_CONFIG=/usr/local/etc/bastille/bastille.conf - export BASTILLE_CONFIG -elif [ -r "/usr/local/etc/bastille/${BASTILLE_CONFIG}" ]; then - BASTILLE_CONFIG="/usr/local/etc/bastille/${BASTILLE_CONFIG}" - export BASTILLE_CONFIG -else - echo "Not a valid config file: ${BASTILLE_CONFIG}" - exit 1 + if [ -z "${BASTILLE_CONFIG}" ]; then + BASTILLE_CONFIG=/usr/local/etc/bastille/bastille.conf + export BASTILLE_CONFIG + elif [ -r "/usr/local/etc/bastille/${BASTILLE_CONFIG}" ]; then + BASTILLE_CONFIG="/usr/local/etc/bastille/${BASTILLE_CONFIG}" + export BASTILLE_CONFIG + else + echo "Not a valid config file: ${BASTILLE_CONFIG}" + exit 1 + fi fi # Load common.sh after setting BASTILLE_CONFIG