diff --git a/utils/backup.sh b/utils/backup.sh index bdf334b6c7bdccc755e42a72e34bf2b5f5443df9..d041d57c60c3af3718eb7281200e14390ab5ccb7 100755 --- a/utils/backup.sh +++ b/utils/backup.sh @@ -58,11 +58,12 @@ backup: EOF ) +UTILS_PATH=`dirname "$(realpath $0)"` # Load settings from .config and defaults ##################################### -. load_settings.sh +. $UTILS_PATH/load_settings.sh # load useful functions ####################################################### -. helpers.sh +. $UTILS_PATH/helpers.sh function backup() { NARG_NAME="$1" diff --git a/utils/load_settings.sh b/utils/load_settings.sh index 461e3ee5894762d6ee8be3713264e97dd3001cb0..5f2b499ba524c97cfcdc352b4337107b3c7e8afd 100644 --- a/utils/load_settings.sh +++ b/utils/load_settings.sh @@ -18,8 +18,11 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. -[[ -n "../config.defaults" ]] && source "../config.defaults" -[[ -n "../.config" ]] && source "../.config" +UTILS_PATH=`dirname "$(realpath $0)"` +MAIN_PATH=`dirname "${UTILS_PATH}"` + +[[ -n "${MAIN_PATH}/config.defaults" ]] && source "${MAIN_PATH}/config.defaults" +[[ -n "${MAIN_PATH}/.config" ]] && source "${MAIN_PATH}/.config" [[ -n "$ENV_FILE" ]] && source "$ENV_FILE" if [[ -z "$DATABASE_NAME" && -z "$MYSQL_CONNECTION" ]]