move chache

This commit is contained in:
rootzoll
2021-07-02 14:11:13 +02:00
parent dbdbfe8622
commit 827364daa9

View File

@@ -20,7 +20,7 @@ if [ "$1" = "peer-status" ]; then
# if second parameter is "cached" deliver cahed result if available
if [ "$2" == "cached" ]; then
cacheExists=$(ls /var/cache/raspiblitz/temp/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
echo "cached=1"
cat /var/cache/raspiblitz/temp/network.monitor.peer-status.cache
@@ -39,8 +39,8 @@ if [ "$1" = "peer-status" ]; then
fi
# output to cache (normally gets written every 1min by background)
echo "running=${running}" > /var/cache/raspiblitz/temp/network.monitor.peer-status.cache
echo "peers=${peerNum}" >> /var/cache/raspiblitz/temp/network.monitor.peer-status.cache
echo "running=${running}" > /var/cache/raspiblitz/network.monitor.peer-status.cache
echo "peers=${peerNum}" >> /var/cache/raspiblitz/network.monitor.peer-status.cache
# output to user
echo "running=${running}"