index info

This commit is contained in:
rootzoll
2019-12-18 22:50:42 +01:00
parent 3c310265bf
commit 839c2c807e

View File

@@ -7,12 +7,33 @@
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "small config script to switch BTC-RPC-explorer on or off"
echo "bonus.btc-rcp-explorer.sh [on|off]"
echo "bonus.btc-rcp-explorer.sh [status|on|off]"
exit 1
fi
# add default value to raspi config if needed
if [ ${#BTCRPCexplorer} -eq 0 ]; then
echo "BTCRPCexplorer=off" >> /mnt/hdd/raspiblitz.conf
fi
source /mnt/hdd/raspiblitz.conf
# status
if [ "$1" = "status" ]; then
if [ "${BTCRPCexplorer}" = "on" ]; then
echo "configured=1"
# check indexing
source <(sudo /home/admin/config.scripts/network.txindex.sh status)
echo "isIndexed=${isIndexed}"
echo "indexInfo=${indexInfo}"
else
echo "configured=0"
fi
exit 0
fi
# determine nodeJS DISTRO
isARM=$(uname -m | grep -c 'arm')
isAARCH64=$(uname -m | grep -c 'aarch64')
@@ -37,11 +58,6 @@ echo "FAIL: Was not able to determine architecture"
exit 1
fi
# add default value to raspi config if needed
if [ ${#BTCRPCexplorer} -eq 0 ]; then
echo "BTCRPCexplorer=off" >> /mnt/hdd/raspiblitz.conf
fi
# stop service
echo "making sure services are not running"
sudo systemctl stop btc-rpc-explorer 2>/dev/null