moved all properties from config files into environment

This commit is contained in:
jash
2018-10-07 16:33:49 +02:00
committed by kexkey
parent d96d113814
commit b1a7204aef
2 changed files with 5 additions and 22 deletions

View File

@@ -5,7 +5,7 @@
send_to_watcher_node()
{
trace "Entering send_to_watcher_node()..."
send_to_bitcoin_node ${WATCHER_NODE_RPC_URL} watcher_btcnode_curlcfg.properties $@
send_to_bitcoin_node ${WATCHER_NODE_RPC_URL} ${WATCHER_NODE_RPC_USER} $@
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_btcnode_curlcfg.properties $@
send_to_bitcoin_node ${SPENDER_NODE_RPC_URL} ${SPENDER_NODE_RPC_USER} $@
local returncode=$?
trace_rc ${returncode}
return ${returncode}
@@ -27,11 +27,11 @@ send_to_bitcoin_node()
local result
local errorstring
local node_url=${1}
local configfile=${2}
local user=${2}
local data=${3}
trace "[send_to_bitcoin_node] curl -s --config ${configfile} -H \"Content-Type: application/json\" -d \"${data}\" ${node_url}"
result=$(curl -s --config ${configfile} -H "Content-Type: application/json" -d "${data}" ${node_url})
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})
returncode=$?
trace_rc ${returncode}
trace "[send_to_bitcoin_node] result=${result}"

View File

@@ -1,17 +0,0 @@
#!/bin/sh
. ./trace.sh
get_prop()
{
trace "Entering get_prop()..."
local property=${1}
trace "[get_prop] property=${property}"
local value=$(grep "${property}" config.properties | cut -d'=' -f2)
trace "[get_prop] value=${value}"
echo ${value}
}