Skip to content
Snippets Groups Projects

Db Profiles

3 files
+ 154
13
Compare changes
  • Side-by-side
  • Inline

Files

+ 16
13
@@ -77,9 +77,12 @@ function dbdetect.exists(){
local _found=0
# show errors in profile ini files
ini.validate "$_config" "$( dirname $0)/includes/dbdetect_validate_profile_ini.sh" && dbdetect._wd "Ini validation OK"
# set file and inisection we read values from
ini.set "$_config" "detect"
# --- check tcp
local tcpport; tcpport=$( ini.value "tcp" )
if [ -n "$tcpport" ]; then
@@ -104,18 +107,6 @@ function dbdetect.exists(){
dbdetect._wd "... tcp $tcpport is used by $tcpprocess."
fi
# --- check binaries
local binary; binary=$( ini.value "binary" )
if [ -n "${binary}" ]; then
for mybinary in $( echo "${binary}" | tr "," " " ); do
if ! which "$mybinary" >/dev/null 2>&1; then
dbdetect._wd "... Missing binary: ${mybinary}"
return 1
fi
dbdetect._wd "... Binary: ${mybinary} was found"
done
fi
# --- check process
local process; process=$( ini.value "process" )
if [ -n "${process}" ]; then
@@ -150,6 +141,18 @@ function dbdetect.exists(){
fi
fi
# --- check binaries
local binary; binary=$( ini.value "binary" )
if [ -n "${binary}" ]; then
for mybinary in $( echo "${binary}" | tr "," " " ); do
if ! which "$mybinary" >/dev/null 2>&1; then
dbdetect._wd "... Missing binary: ${mybinary}"
return 1
fi
dbdetect._wd "... Binary: ${mybinary} was found"
done
fi
# --- OK, everything was found ... we initialize it
dbdetect._wd "OK, match: $_config"
Loading