Merge pull request #210 from mariusvw/feature/config-check

Feature/config check
This commit is contained in:
Christer Edwards
2020-05-20 09:52:46 -06:00
committed by GitHub

View File

@@ -45,9 +45,18 @@ bastille_root_check() {
bastille_root_check
## we only load the config if root_check passes
## check for config existance
bastille_conf_check() {
if [ ! -r /usr/local/etc/bastille/bastille.conf ]; then
echo -e "${COLOR_RED}Missing Configuration${COLOR_RESET}" 1>&2
exit 1
fi
}
bastille_conf_check
## we only load the config if conf_check passes
. /usr/local/etc/bastille/bastille.conf
. /usr/local/share/bastille/colors.pre.sh
## bastille_prefix should be 0750
## this restricts file system access to privileged users
@@ -65,9 +74,6 @@ bastille_perms_check() {
bastille_perms_check
## we only load the config if root_check passes
. /usr/local/etc/bastille/bastille.conf
## version
BASTILLE_VERSION="0.6.20200414"