mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 12:10:33 +02:00
move chache
This commit is contained in:
@@ -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}"
|
||||
|
Reference in New Issue
Block a user