add LIB Load Routine

This commit is contained in:
6543 2019-05-11 23:27:10 +02:00
parent 50eef4fbd5
commit e28014cda2

View File

@ -38,6 +38,18 @@
dbhost=$(grep -v '#' $globalconf | grep ^dbhost= | sed "s|^dbhost=||g" | tr -d '"') dbhost=$(grep -v '#' $globalconf | grep ^dbhost= | sed "s|^dbhost=||g" | tr -d '"')
dbuser=$(grep -v '#' $globalconf | grep ^dbuser= | sed "s|^dbuser=||g" | tr -d '"') dbuser=$(grep -v '#' $globalconf | grep ^dbuser= | sed "s|^dbuser=||g" | tr -d '"')
dbpwd=$(grep -v '#' $globalconf | grep ^dbpwd= | sed "s|^dbpwd=||g" | tr -d '"') dbpwd=$(grep -v '#' $globalconf | grep ^dbpwd= | sed "s|^dbpwd=||g" | tr -d '"')

#load functions from LIB
if [ -f "$(readlink -f "$(dirname $0)/bash-lib")" ]; then
source "$(readlink -f "$(dirname $0)/bash-lib")"
[ $DEBUG == $TRUE ] && echo "LIB VERSION: $LIBVER"
elif [ -f "/usr/lib/tt/bash-lib" ]; then #<LIBDIR>
source "/usr/lib/tt/bash-lib"
[ $DEBUG == $TRUE ] && echo "LIB VERSION: $LIBVER"
else
echo "ERROR: Global Lib not found"
exit 255
fi
} }


function help() { function help() {