This commit is contained in:
qo-op 2020-04-19 13:14:47 +02:00
parent bf209a69a6
commit c1545b76b5
3 changed files with 4 additions and 4 deletions

View File

@ -39,13 +39,13 @@ _|_| | __) __)\/\//--\| \| | | \|_| | \|___)| |
ipfs get --output=$HOME/.zen/ipfs_swarm/ /ipns/$ipfsnodeid
count=1
# Search for All peers Nodes. ## TODO: To be changed when Swarm is too big or not expendanding
#for id in ./wallets/.Qm*/; # Alternative search
#for id in ./ipfs_swarm/.Qm*/; # Alternative search
for id in $(ipfs swarm peers | awk -F '/' '{print $7}');
do
count=$((count+1))
id=$(echo $id | cut -d '.' -f 3 | cut -d '/' -f 1)
echo "Refreshing ~/.zen/ipfs_swarm/.$id"
rm -Rf $HOME/.zen/ipfs_swarm/.$id
$MY_PATH/tools/timeout.sh -t 10 ipfs get --output=$HOME/.zen/ipfs_swarm/ /ipns/$id
$MY_PATH/tools/timeout.sh -t 30 ipfs get --output=$HOME/.zen/ipfs_swarm/ /ipns/$id
done

View File

@ -33,7 +33,7 @@ self_name=$(sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$self"
ipfsnodeid=$(ipfs id -f='<id>\n')
current_ts=$(date -u +%s%N | cut -b1-13)
[ -f ~/.zen/zenyta.last.ts ] && last_ts=$(cat ~/.zen/zenyta.last.ts) || last_ts=$((current_ts - 10*24*3600*1000 - 1)) # 10*24h ago
[ -f ~/.zen/zenyta.last.ts ] && last_ts=$(cat ~/.zen/zenyta.last.ts) || last_ts=$((current_ts - 24*3600*1000 - 1)) # 24h ago
echo "
_

View File

@ -34,7 +34,7 @@ ipfsnodeid=$(ipfs id -f='<id>\n')
current_ts=$(date -u +%s%N | cut -b1-13)
[ -f ~/.zen/zenytv.last.ts ] && last_ts=$(cat ~/.zen/zenytv.last.ts) || last_ts=$((current_ts - 10*24*3600*1000 - 1)) # 10*24h ago
[ -f ~/.zen/zenytv.last.ts ] && last_ts=$(cat ~/.zen/zenytv.last.ts) || last_ts=$((current_ts - 24*3600*1000 - 1)) # 24h ago
echo "
_