mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-28 21:12:37 +02:00
Node password on ENV variable, fix os_stat
This commit is contained in:
parent
fd8928e869
commit
c733bc3571
2
apolloui
2
apolloui
@ -1 +1 @@
|
||||
Subproject commit 2c4618f2bf01a078b6204f48f9a05d836b40daad
|
||||
Subproject commit 79b38394821d3307f3b44126086ce21e96cd00ca
|
@ -5,4 +5,4 @@ rpcpassword=futurebit
|
||||
daemon=0
|
||||
maxconnections=32
|
||||
upnp=1
|
||||
uacomment=FutureBit-Apollo-Node
|
||||
uacomment=FutureBit-Apollo-Node
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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 () {
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -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 = {
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user