Skip to content
Snippets Groups Projects
Commit 72e9e862 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

rename "tcp" --> "tcp-port"; war on missing replacements

parent 09bae785
Branches
No related tags found
1 merge request!129Db Profiles
...@@ -99,7 +99,7 @@ function dbdetect.exists(){ ...@@ -99,7 +99,7 @@ function dbdetect.exists(){
ini.set "$_config" "detect" ini.set "$_config" "detect"
# --- check tcp # --- check tcp
local tcpport; tcpport=$( ini.value "tcp" ) local tcpport; tcpport=$( ini.value "tcp-port" )
if [ -n "$tcpport" ]; then if [ -n "$tcpport" ]; then
local tcptarget; tcptarget=$( ini.value "tcp-target" ) local tcptarget; tcptarget=$( ini.value "tcp-target" )
tcptarget=${tcptarget:-localhost} tcptarget=${tcptarget:-localhost}
...@@ -176,11 +176,10 @@ function dbdetect.exists(){ ...@@ -176,11 +176,10 @@ function dbdetect.exists(){
local dbuser=$( ini.value "dbuser" ) local dbuser=$( ini.value "dbuser" )
local dbpassword=$( ini.value "dbpassword" ) local dbpassword=$( ini.value "dbpassword" )
for mykey in env params
for mykey in su env params
do do
value="$( ini.value "$mykey" )" value="$( ini.value "$mykey" )"
value="${value//\{\{tcp\}\}/$tcpport}" value="${value//\{\{tcpport\}\}/$tcpport}"
value="${value//\{\{tcp-target\}\}/$tcptarget}" value="${value//\{\{tcp-target\}\}/$tcptarget}"
value="${value//\{\{dbuser\}\}/$dbuser}" value="${value//\{\{dbuser\}\}/$dbuser}"
value="${value//\{\{dbpassword\}\}/$dbpassword}" value="${value//\{\{dbpassword\}\}/$dbpassword}"
......
...@@ -35,7 +35,7 @@ varsCan=" ...@@ -35,7 +35,7 @@ varsCan="
detect.binary detect.binary
detect.process detect.process
detect.tcp:[0-9]* detect.tcp-port:[0-9]*
detect.tcp-target detect.tcp-target
detect.tcp-process detect.tcp-process
detect.type:sqlite detect.type:sqlite
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
[detect] [detect]
tcp = 5984 tcp-port = 5984
tcp-target = localhost tcp-target = localhost
tcp-process = 'beam.smp' tcp-process = 'beam.smp'
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
[detect] [detect]
# process = 'slapd' # process = 'slapd'
tcp = 636 tcp-port = 636
tcp-target = localhost tcp-target = localhost
tcp-process = 'slapd' tcp-process = 'slapd'
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
[detect] [detect]
process = 'mysqld|mariadb' process = 'mysqld|mariadb'
tcp = 3306 tcp-port = 3306
tcp-target = localhost tcp-target = localhost
tcp-process = 'mysqld|mariadbd' tcp-process = 'mysqld|mariadbd'
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
[detect] [detect]
process = 'postgres|postmaster' process = 'postgres|postmaster'
tcp = 5432 tcp-port = 5432
tcp-target = localhost tcp-target = localhost
tcp-process = 'postgres|postmaster' tcp-process = 'postgres|postmaster'
...@@ -26,7 +26,7 @@ dbpassword = '' ...@@ -26,7 +26,7 @@ dbpassword = ''
; -w, --no-password never prompt for password ; -w, --no-password never prompt for password
; -W, --password force password prompt (should happen automatically) ; -W, --password force password prompt (should happen automatically)
; ;
# params = '--host= {{tcp-target}} --port={tcp}} --username={{dbuser}} --no-password' # params = '--host= {{tcp-target}} --port={{tcp-port}} --username={{dbuser}} --no-password'
# https://www.postgresql.org/docs/current/libpq-envars.html # https://www.postgresql.org/docs/current/libpq-envars.html
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
[detect] [detect]
process = 'postgres|postmaster' process = 'postgres|postmaster'
tcp = 5432 tcp-port = 5432
tcp-target = dbserver.example.com tcp-target = dbserver.example.com
tcp-process = 'postgres|postmaster' tcp-process = 'postgres|postmaster'
...@@ -19,7 +19,7 @@ su = '' ...@@ -19,7 +19,7 @@ su = ''
dbuser = 'mydbuser' dbuser = 'mydbuser'
dbpassword = 'mypassword' dbpassword = 'mypassword'
params = '--host= {{tcp-target}} --port={tcp}} --username={{dbuser}}' params = '--host= {{tcp-target}} --port={{tcp-port}} --username={{dbuser}}'
env = 'PGPASSWORD={{dbpassword}}' env = 'PGPASSWORD={{dbpassword}}'
# https://www.postgresql.org/docs/current/libpq-envars.html # https://www.postgresql.org/docs/current/libpq-envars.html
......
...@@ -66,9 +66,9 @@ Replacements that can be used for values `params` and `env`: ...@@ -66,9 +66,9 @@ Replacements that can be used for values `params` and `env`:
| Key | Description | | Key | Description |
|--- |--- | |--- |--- |
| {{tcp}} | value of [detect] -> tcp
| {{dbpassword}} | value of [set] -> dbpassword | {{dbpassword}} | value of [set] -> dbpassword
| {{dbuser}} | value of [set] -> dbuser | {{dbuser}} | value of [set] -> dbuser
| {{tcp-port}} | value of [detect] -> tcp-port
| {{tcp-target}} | value of [detect] -> tcp-target | {{tcp-target}} | value of [detect] -> tcp-target
```ini ```ini
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment