Skip to content

Commit f927849

Browse files
authored
Simplify config options when running within myNode (#44)
1 parent 7672813 commit f927849

5 files changed

Lines changed: 17 additions & 6 deletions

File tree

scripts/_functions.bitcoincore.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ function connectLocalNode() {
367367
if [ $runningEnv = raspiblitz ];then
368368
rpc_user=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcuser | cut -c 9-)
369369
rpc_pass=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf|grep rpcpassword|cut -c 13-)
370+
elif [ $runningEnv = mynode ];then
371+
rpc_user=mynode
372+
rpc_pass=$(sudo cat /mnt/hdd/mynode/settings/.btcrpcpw)
370373
elif [ $runningEnv = standalone ];then
371374
rpc_user=$(sudo cat /home/bitcoin/.bitcoin/bitcoin.conf|grep rpcuser|cut -c 9-)
372375
rpc_pass=$(sudo cat /home/bitcoin/.bitcoin/bitcoin.conf|grep rpcpassword|cut -c 13-)

scripts/menu.config.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ source /home/joinmarket/_functions.sh
66
if [ "${runningEnv}" = standalone ]; then
77
source /home/joinmarket/standalone/_functions.standalone.sh
88
network=mainnet
9+
elif [ "${runningEnv}" = mynode ];then
10+
network=mainnet
911
elif [ "${runningEnv}" = raspiblitz ];then
1012
source /mnt/hdd/raspiblitz.conf
1113
if [ $network = bitcoin ];then

scripts/menu.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ OPTIONS+=(
2828
"" ""
2929
OFFERS "Watch the Order Book locally"
3030
"" ""
31-
CONFIG "Connection and joinmarket.cfg settings"
32-
TOOLS "Extra helper functions and services"
33-
UPDATE "Update JoininBox or JoinMarket")
31+
CONFIG "Connection and joinmarket.cfg settings" \
32+
TOOLS "Extra helper functions and services")
33+
if [ "${runningEnv}" != mynode ]; then
34+
OPTIONS+=(UPDATE "Update JoininBox or JoinMarket")
35+
fi
3436

3537
CHOICE=$(dialog --clear \
3638
--backtitle "$BACKTITLE" \

scripts/menu.tools.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ fi
5151
OPTIONS+=(
5252
QR "Display a QR code from any text"
5353
CUSTOMRPC "Run a custom bitcoin RPC with curl"
54-
BOLTZMANN "Analyze the entropy of a transaction"
55-
PASSWORD "Change the ssh password"
56-
LOGS "Show the bitcoind logs on $network")
54+
BOLTZMANN "Analyze the entropy of a transaction")
55+
if [ "${runningEnv}" != mynode ]; then
56+
OPTIONS+=(PASSWORD "Change the ssh password")
57+
fi
58+
OPTIONS+=(LOGS "Show the bitcoind logs on $network")
5759

5860
CHOICE=$(dialog --clear \
5961
--backtitle "$BACKTITLE" \

scripts/start.joininbox.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ if [ "$setupStep" -lt 100 ];then
2525
if [ "$runningEnvEntry" -eq 0 ];then
2626
if [ -f "/mnt/hdd/raspiblitz.conf" ];then
2727
runningEnv="raspiblitz"
28+
elif [ -f "/usr/share/mynode/mynode_config.sh" ];then
29+
runningEnv="mynode"
2830
else
2931
runningEnv="standalone"
3032
fi

0 commit comments

Comments
 (0)