diff --git a/apolloui b/apolloui index 2c4618f..79b3839 160000 --- a/apolloui +++ b/apolloui @@ -1 +1 @@ -Subproject commit 2c4618f2bf01a078b6204f48f9a05d836b40daad +Subproject commit 79b38394821d3307f3b44126086ce21e96cd00ca diff --git a/backend/node/bitcoin.conf b/backend/node/bitcoin.conf index e567415..06889b2 100755 --- a/backend/node/bitcoin.conf +++ b/backend/node/bitcoin.conf @@ -5,4 +5,4 @@ rpcpassword=futurebit daemon=0 maxconnections=32 upnp=1 -uacomment=FutureBit-Apollo-Node \ No newline at end of file +uacomment=FutureBit-Apollo-Node diff --git a/backend/os_stats b/backend/os_stats index 18ee623..76eaf4d 100755 --- a/backend/os_stats +++ b/backend/os_stats @@ -34,7 +34,7 @@ if [ -f "/sys/devices/virtual/thermal/thermal_zone0/temp" ]; then else TEMP="0" fi -ACTIVE_WIFI=$(nmcli -t -f name c show --active | awk 'NR%2{printf "%s ",$0;next;}1') +ACTIVE_WIFI=$(nmcli -t -f name c show --active | sed -z 's/\n/,/g;s/,$/\n/') MINER_TEMP="0" diff --git a/src/store/api/node/nodeStats.js b/src/store/api/node/nodeStats.js index 99b1286..94853ce 100644 --- a/src/store/api/node/nodeStats.js +++ b/src/store/api/node/nodeStats.js @@ -75,7 +75,7 @@ const bitcoinClient = new bitcoin.Client({ host: '127.0.0.1', port: 8332, user: 'futurebit', - pass: 'futurebit', + pass: process.env.BITCOIND_PASSWORD, timeout: 30000, ssl: false }); @@ -171,3 +171,4 @@ function getNodeStats () { ] ) } + diff --git a/src/utils.js b/src/utils.js index e00c9ee..d7255f5 100644 --- a/src/utils.js +++ b/src/utils.js @@ -21,7 +21,10 @@ module.exports.auth = { changeNodeRpcPassword (password) { exec(`sudo sed -i s/rpcpassword.*/rpcpassword=${password}/g /opt/apolloapi/backend/node/bitcoin.conf`) + if (process.env.BITCOIND_PASSWORD) exec(`sudo sed -i s/BITCOIND_PASSWORD.*/BITCOIND_PASSWORD=${password}/g /opt/apolloapi/.env`) + else exec(`sudo echo "BITCOIND_PASSWORD=${password}" >> /opt/apolloapi/.env`) exec('sudo systemctl restart node') + exec('sudo systemctl restart apollo-ui') }, generateAccessToken () { @@ -34,3 +37,4 @@ module.exports.auth = { } }, } +