summaryrefslogtreecommitdiff
path: root/apps/bash_shared/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'apps/bash_shared/common.sh')
-rw-r--r--apps/bash_shared/common.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/bash_shared/common.sh b/apps/bash_shared/common.sh
index acd23eacdf..46422119b1 100644
--- a/apps/bash_shared/common.sh
+++ b/apps/bash_shared/common.sh
@@ -1,17 +1,19 @@
function registerHooks() { acore_event_registerHooks "$@"; }
function runHooks() { acore_event_runHooks "$@"; }
-#shellcheck source=../../conf/dist/config.sh
-source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
+function acore_common_loadConfig() {
+ #shellcheck source=../../conf/dist/config.sh
+ source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
-# first check if it's defined in env, otherwise use the default
-USER_CONF_PATH=${USER_CONF_PATH:-"$AC_PATH_CONF/config.sh"}
+ # first check if it's defined in env, otherwise use the default
+ USER_CONF_PATH=${USER_CONF_PATH:-"$AC_PATH_CONF/config.sh"}
-if [ -f "$USER_CONF_PATH" ]; then
- source "$USER_CONF_PATH" # should overwrite previous
-else
- echo "NOTICE: file <$USER_CONF_PATH> not found, we use default configuration only."
-fi
+ if [ -f "$USER_CONF_PATH" ]; then
+ source "$USER_CONF_PATH" # should overwrite previous
+ else
+ echo "NOTICE: file <$USER_CONF_PATH> not found, we use default configuration only."
+ fi
+}
#
# Load modules