2018-11-13 20:41:45 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# USE THIS SCRIPT FOR BASIC SYSTEM STATUS DEBUG INFO
|
|
|
|
|
|
|
|
# load code software version
|
|
|
|
source /home/admin/_version.info
|
|
|
|
|
2018-12-03 01:01:55 +01:00
|
|
|
## get basic info (its OK if not set yet)
|
|
|
|
source /mnt/hdd/raspiblitz.conf
|
|
|
|
|
|
|
|
# check network and get backup if from old config
|
|
|
|
if [ ${#network} -eq 0 ]; then
|
|
|
|
echo "backup info: network"
|
|
|
|
network="bitcoin"
|
|
|
|
litecoinActive=$(sudo ls /mnt/hdd/litecoin/litecoin.conf | grep -c 'litecoin.conf')
|
|
|
|
if [ ${litecoinActive} -eq 1 ]; then
|
|
|
|
network="litecoin"
|
|
|
|
fi
|
|
|
|
network=`sudo cat /home/admin/.network`
|
|
|
|
fi
|
|
|
|
|
|
|
|
# check chain and get backup if from system
|
|
|
|
if [ ${#chain} -eq 0 ]; then
|
|
|
|
echo "backup info: chain"
|
|
|
|
chain="test"
|
|
|
|
isMainChain=$(sudo cat /mnt/hdd/${network}/${network}.conf 2>/dev/null | grep "#testnet=1" -c)
|
|
|
|
if [ ${isMainChain} -gt 0 ];then
|
|
|
|
chain="main"
|
|
|
|
fi
|
2018-11-13 20:41:45 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "*** RASPIBLITZ LOGS ***"
|
|
|
|
echo "blitzversion: ${codeVersion}"
|
|
|
|
echo "chainnetwork: ${network} / ${chain}"
|
|
|
|
uptime
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "*** CHAINNETWORK SYSTEMD STATUS ***"
|
|
|
|
sudo systemctl status ${network}d -n2 --no-pager
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "*** LAST 20 CHAINNETWORK LOGS ***"
|
|
|
|
pathAdd=""
|
|
|
|
if [ "${chain}" = "test" ]; then
|
2018-12-03 01:01:55 +01:00
|
|
|
pathAdd="/testnet3"
|
2018-11-13 20:41:45 +01:00
|
|
|
fi
|
|
|
|
sudo tail -n 20 /mnt/hdd/${network}${pathAdd}/debug.log
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "*** LND SYSTEMD STATUS ***"
|
|
|
|
sudo systemctl status lnd -n2 --no-pager
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "*** LAST 20 LND LOGS ***"
|
|
|
|
sudo journalctl -u lnd -b --no-pager -n20
|
|
|
|
echo ""
|