forked from axiom-team/astroport
cd ~/ instead of $HOME
This commit is contained in:
parent
f5f5a2b06b
commit
3925655d98
|
@ -35,21 +35,26 @@ _|_| | __) __)\/\//--\| \| | | \|_| | \|___)| |
|
||||||
|
|
||||||
'
|
'
|
||||||
echo "I am $ipfsnodeid"
|
echo "I am $ipfsnodeid"
|
||||||
|
cd ~/
|
||||||
|
|
||||||
# PUBLISH NODE ipfs shared data to swarm
|
# PUBLISH NODE ipfs shared data to swarm
|
||||||
|
[[ ! -d ~/.zen/ipfs ]] && echo "ERROR please create ~/.zen/ipfs/" && exit 1
|
||||||
IWALLETS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
|
IWALLETS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
|
||||||
NODEIPNS=$(ipfs name publish --quieter /ipfs/$IWALLETS)
|
NODEIPNS=$(ipfs name publish --quieter /ipfs/$IWALLETS)
|
||||||
|
|
||||||
# GET IPNS published wallets from ALL SWARM NODES ## TODO: IF NODES are MISSING, check ./wallets_swarm/.QmNODES...
|
# GET IPNS published wallets from ALL SWARM NODES ## TODO: IF NODES are MISSING, check ./wallets_swarm/.QmNODES...
|
||||||
ipfs get --output=$HOME/.zen/ipfs_swarm/ /ipns/$ipfsnodeid
|
ipfs get --output=./.zen/ipfs_swarm/ /ipns/$ipfsnodeid
|
||||||
count=1
|
count=1
|
||||||
# Search for All peers Nodes. ## TODO: To be changed when Swarm is too big or not expendanding
|
# Search for All peers Nodes. ## TODO: To be changed when Swarm is too big or not expendanding
|
||||||
#for id in ./ipfs_swarm/.Qm*/; # Alternative search
|
#for id in ./ipfs_swarm/.Qm*/; # Alternative search
|
||||||
|
|
||||||
|
|
||||||
for id in $(ipfs swarm peers | awk -F '/' '{print $7}');
|
for id in $(ipfs swarm peers | awk -F '/' '{print $7}');
|
||||||
do
|
do
|
||||||
count=$((count+1))
|
count=$((count+1))
|
||||||
id=$(echo $id | cut -d '.' -f 3 | cut -d '/' -f 1)
|
id=$(echo $id | cut -d '.' -f 3 | cut -d '/' -f 1)
|
||||||
echo "Refreshing ~/.zen/ipfs_swarm/.$id"
|
echo "Refreshing ~/.zen/ipfs_swarm/.$id"
|
||||||
rm -Rf $HOME/.zen/ipfs_swarm/.$id
|
rm -Rf ./.zen/ipfs_swarm/.$id
|
||||||
$MY_PATH/tools/timeout.sh -t 30 ipfs get --output=$HOME/.zen/ipfs_swarm/ /ipns/$id
|
$MY_PATH/tools/timeout.sh -t 30 ipfs get --output=./.zen/ipfs_swarm/ /ipns/$id
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue