fix db config load

This commit is contained in:
6543 2019-05-12 00:47:32 +02:00
parent e2c482403b
commit 3d291d2e6d

View File

@ -66,7 +66,7 @@ function config_load() {
readonly dbhost=$(grep -v '#' $config | grep ^dbhost= | sed "s|^dbhost=||g" | tr -d '"') readonly dbhost=$(grep -v '#' $config | grep ^dbhost= | sed "s|^dbhost=||g" | tr -d '"')
readonly dbuser=$(grep -v '#' $config | grep ^dbuser= | sed "s|^dbuser=||g" | tr -d '"') readonly dbuser=$(grep -v '#' $config | grep ^dbuser= | sed "s|^dbuser=||g" | tr -d '"')
readonly dbpwd=$(grep -v '#' $config | grep ^dbpwd= | sed "s|^dbpwd=||g" | tr -d '"') readonly dbpwd=$(grep -v '#' $config | grep ^dbpwd= | sed "s|^dbpwd=||g" | tr -d '"')
readonly dbport=$(grep -v '#' $config | grep ^dbpwd= | sed "s|^dbport=||g" | tr -d '"') readonly dbport=$(grep -v '#' $config | grep ^dbport= | sed "s|^dbport=||g" | tr -d '"')
#db checks #db checks
[ "$(db_check)" == $FALSE ] && { [ "$(db_check)" == $FALSE ] && {
echo "DB ERROR!!" >&2 echo "DB ERROR!!" >&2