mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 13:02:21 +02:00
netwok.monitor.sh debug
This commit is contained in:
@@ -20,7 +20,7 @@ source <(/home/admin/config.scripts/network.aliases.sh getvars lnd ${chain}net)
|
|||||||
if [ "$1" = "peer-status" ]; then
|
if [ "$1" = "peer-status" ]; then
|
||||||
echo "#network.monitor.sh peer-status"
|
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
|
if [ "$2" == "cached" ]; then
|
||||||
cacheExists=$(ls /var/cache/raspiblitz/network.monitor.peer-status.cache 2>/dev/null | grep -c "etwork.monitor.peer-status.cache")
|
cacheExists=$(ls /var/cache/raspiblitz/network.monitor.peer-status.cache 2>/dev/null | grep -c "etwork.monitor.peer-status.cache")
|
||||||
if [ "${cacheExists}" == "1" ]; then
|
if [ "${cacheExists}" == "1" ]; then
|
||||||
@@ -40,7 +40,6 @@ if [ "$1" = "peer-status" ]; then
|
|||||||
else
|
else
|
||||||
# user call
|
# user call
|
||||||
peerNum=$($bitcoincli_alias getnetworkinfo 2>/dev/null | grep "connections\"" | tr -cd '[[:digit:]]')
|
peerNum=$($bitcoincli_alias getnetworkinfo 2>/dev/null | grep "connections\"" | tr -cd '[[:digit:]]')
|
||||||
peerNum=$( getnetworkinfo | grep "connections\"" | tr -cd '[[:digit:]]')
|
|
||||||
fi
|
fi
|
||||||
if [ "${peerNum}" = "" ]; then
|
if [ "${peerNum}" = "" ]; then
|
||||||
running=0
|
running=0
|
||||||
|
Reference in New Issue
Block a user