mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-25 16:44:49 +01:00
curl needs to use config files for credentials so they do not show up in ps. We create these config files now at container startup
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
send_to_watcher_node()
|
||||
{
|
||||
trace "Entering send_to_watcher_node()..."
|
||||
send_to_bitcoin_node ${WATCHER_NODE_RPC_URL} ${WATCHER_NODE_RPC_USER} $@
|
||||
send_to_bitcoin_node ${WATCHER_NODE_RPC_URL} ${WATCHER_BTC_NODE_RPC_CFG} $@
|
||||
local returncode=$?
|
||||
trace_rc ${returncode}
|
||||
return ${returncode}
|
||||
@@ -14,7 +14,7 @@ send_to_watcher_node()
|
||||
send_to_spender_node()
|
||||
{
|
||||
trace "Entering send_to_spender_node()..."
|
||||
send_to_bitcoin_node ${SPENDER_NODE_RPC_URL} ${SPENDER_NODE_RPC_USER} $@
|
||||
send_to_bitcoin_node ${SPENDER_NODE_RPC_URL} ${SPENDER_BTC_NODE_RPC_CFG} $@
|
||||
local returncode=$?
|
||||
trace_rc ${returncode}
|
||||
return ${returncode}
|
||||
@@ -27,11 +27,11 @@ send_to_bitcoin_node()
|
||||
local result
|
||||
local errorstring
|
||||
local node_url=${1}
|
||||
local user=${2}
|
||||
local config=${2}
|
||||
local data=${3}
|
||||
|
||||
trace "[send_to_bitcoin_node] curl -s --user ${user} -H \"Content-Type: application/json\" -d \"${data}\" ${node_url}"
|
||||
result=$(curl -s --user ${user} -H "Content-Type: application/json" -d "${data}" ${node_url})
|
||||
result=$(curl -s --config ${config} -H "Content-Type: application/json" -d "${data}" ${node_url})
|
||||
returncode=$?
|
||||
trace_rc ${returncode}
|
||||
trace "[send_to_bitcoin_node] result=${result}"
|
||||
|
||||
Reference in New Issue
Block a user