mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-23 18:50:46 +01:00
Add check for config existance and readable
This commit is contained in:
@@ -45,7 +45,17 @@ bastille_root_check() {
|
|||||||
|
|
||||||
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/etc/bastille/bastille.conf
|
||||||
|
|
||||||
## bastille_prefix should be 0750
|
## bastille_prefix should be 0750
|
||||||
|
|||||||
Reference in New Issue
Block a user