netwok.monitor.sh debug

This commit is contained in:
openoms
2021-07-05 22:30:37 +01:00
parent 586d8ce3c6
commit 7f50d14cbe

View File

@@ -20,7 +20,7 @@ source <(/home/admin/config.scripts/network.aliases.sh getvars lnd ${chain}net)
if [ "$1" = "peer-status" ]; then
echo "#network.monitor.sh peer-status"
# if second parameter is "cached" deliver cahed result if available
# if second parameter is "cached" deliver cached result if available
if [ "$2" == "cached" ]; then
cacheExists=$(ls /var/cache/raspiblitz/network.monitor.peer-status.cache 2>/dev/null | grep -c "etwork.monitor.peer-status.cache")
if [ "${cacheExists}" == "1" ]; then
@@ -40,7 +40,6 @@ if [ "$1" = "peer-status" ]; then
else
# user call
peerNum=$($bitcoincli_alias getnetworkinfo 2>/dev/null | grep "connections\"" | tr -cd '[[:digit:]]')
peerNum=$( getnetworkinfo | grep "connections\"" | tr -cd '[[:digit:]]')
fi
if [ "${peerNum}" = "" ]; then
running=0