From 5463c9267b7b76c55caea657a3754cdd531b93c6 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Tue, 12 Mar 2024 17:25:29 +0100
Subject: [PATCH] update db detector

---
 includes/dbdetect.class.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/includes/dbdetect.class.sh b/includes/dbdetect.class.sh
index 0ec311b..dd08dd4 100644
--- a/includes/dbdetect.class.sh
+++ b/includes/dbdetect.class.sh
@@ -162,7 +162,7 @@ function dbdetect.exists(){
     for mykey in su env params
     do
         value="$( ini.value "$mykey" )"
-        value="${value//\{\{tcp-port\}\}/$tcpport}"
+        value="${value//\{\{tcp\}\}/$tcpport}"
         value="${value//\{\{tcp-target\}\}/$tcptarget}"
         value="${value//\{\{dbuser\}\}/$dbuser}"
         value="${value//\{\{dbpassword\}\}/$dbpassword}"
@@ -178,7 +178,9 @@ function dbdetect.exists(){
 }
 
 # set a profile name
+# param  string  profile name
 function dbdetect.setProfile(){
+  PROFILENAME="${1:-$PROFILENAME}"
   dbdetect.exists "${DBD_BASEDIR}/${PROFILENAME}.ini"
 }
 
-- 
GitLab