ipfs get --progress=false
This commit is contained in:
parent
52b7d6f841
commit
adcb6ee8fc
|
@ -94,7 +94,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
|||
################### GET LATEST TW
|
||||
echo "GETTING TW..."
|
||||
####################################################################################################
|
||||
ipfs --timeout 480s get -o ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html /ipns/${ASTRONAUTENS}
|
||||
ipfs --timeout 480s get --progress=false -o ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html /ipns/${ASTRONAUTENS}
|
||||
####################################################################################################
|
||||
## PLAYER TW IS ONLINE ?
|
||||
if [ ! -s ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html ]; then
|
||||
|
@ -243,7 +243,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
|||
## ZEN STATION
|
||||
MYNS=$(cat ~/.zen/tmp/swarm/12D*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS)
|
||||
UMAPG1PUB=$(cat ~/.zen/tmp/swarm/12D*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB)
|
||||
## BOOSTRAP SCENARIO
|
||||
## BOOSTRAP CASE
|
||||
[[ $MYNS == "" ]] \
|
||||
&& MYNS=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS) \
|
||||
&& UMAPG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB)
|
||||
|
|
|
@ -98,7 +98,7 @@ for REGION in ${REGIONS[@]}; do
|
|||
TODATEREGIONNS=$(ipfs key import ${TODATE}${REGIONG1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/REGION.priv)
|
||||
##############################################################
|
||||
## GET from IPNS
|
||||
ipfs --timeout 240s get -o ~/.zen/tmp/${MOATS}/${REGION}/ /ipns/${YESTERDATEREGIONNS}/
|
||||
ipfs --timeout 240s get --progress=false -o ~/.zen/tmp/${MOATS}/${REGION}/ /ipns/${YESTERDATEREGIONNS}/
|
||||
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
## SHOULD NEED 12 SIGNATURES
|
||||
## FULL REFRESH DEMO... ZEN CHAINING COMING LATER
|
||||
|
|
|
@ -99,7 +99,7 @@ for SECTOR in ${SECTORS[@]}; do
|
|||
start=`date +%s`
|
||||
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
#~ ## IPFS GET ONLINE YESTERDATE SECTORNS
|
||||
ipfs --timeout 180s get -o ~/.zen/tmp/${MOATS}/${SECTOR}/ /ipns/${YESTERDATENS}/
|
||||
ipfs --timeout 180s get --progress=false -o ~/.zen/tmp/${MOATS}/${SECTOR}/ /ipns/${YESTERDATENS}/
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "(╥☁╥ ) swarm memory empty (╥☁╥ )"
|
||||
# Try retieve memory from UPlanet Zen Memory
|
||||
|
|
|
@ -101,7 +101,7 @@ for UMAP in ${unique_combined[@]}; do
|
|||
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
mkdir ~/.zen/tmp/${MOATS}/${UMAP}
|
||||
echo "## IPFS GET YESTERDATENS"
|
||||
ipfs --timeout 300s get -o ~/.zen/tmp/${MOATS}/${UMAP}/ /ipns/${YESTERDATENS}/
|
||||
ipfs --timeout 300s get --progress=false -o ~/.zen/tmp/${MOATS}/${UMAP}/ /ipns/${YESTERDATENS}/
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "(╥☁╥ ) swarm online memory empty (╥☁╥ )"
|
||||
# Try retieve memory from UPlanet Zen Memory
|
||||
|
|
|
@ -55,7 +55,7 @@ if [[ -s ~/.zen/tmp/${MOATS}/${REGION}.g1history.json ]]; then
|
|||
if [[ $ipfs_pop ]]; then
|
||||
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${REGION}.g1history.json | tail -n 1)
|
||||
echo "INFO :: $g1pub Memory updater"
|
||||
ipfs --timeout 180s get -o ~/.zen/tmp/${MOATS}/${SECTOR} $ipfs_pop \
|
||||
ipfs --timeout 180s get --progress=false -o ~/.zen/tmp/${MOATS}/${SECTOR} $ipfs_pop \
|
||||
|| echo "$ipfs_pop ERROR ... "
|
||||
else
|
||||
echo "WARNING cannot revover any memory !!"
|
||||
|
|
|
@ -60,7 +60,7 @@ if [[ -s ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json ]]; then
|
|||
echo "FOUND $todate MEMORY SLOT"
|
||||
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${UMAP}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json | tail -n 1)
|
||||
[[ "$g1pub" != "$G1PUB" ]] && echo "INFO :: $g1pub Memory updater"
|
||||
ipfs --timeout 180s get -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
||||
ipfs --timeout 180s --progress=false get -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
||||
|| echo "$ipfs_pop ERROR ... "
|
||||
else
|
||||
echo "WARNING cannot revover any memory !!"
|
||||
|
|
|
@ -34,7 +34,7 @@ echo "COINCHECK ${G1PUB} -> TW : $myIPFS/ipns/${ASTROTOIPFS}"
|
|||
echo "Cleaning ${G1PUB}.COINS"
|
||||
find ~/.zen/tmp/ -mtime +1 -type f -name "${G1PUB}.COINS" -exec mv '{}' $HOME/.zen/tmp/backup.${G1PUB} \;
|
||||
echo "Cleaning ${G1PUB}.g1history.json"
|
||||
find ~/.zen/tmp/coucou/ -mtime +1 -type f -name "${G1PUB}.g1history.json" -exec rm '{}' \;
|
||||
find ~/.zen/tmp/coucou/ -mtime +1 -type f -name "${G1PUB}.g1history.json" -exec rm '{}' \;
|
||||
#######################################################
|
||||
|
||||
## IDENTIFY IF "ASTROPORT" PLAYER
|
||||
|
|
|
@ -32,14 +32,14 @@ echo "===== ${G1PUB} ===== ${COINS} G1 / ${ZEN} ZEN"
|
|||
if [[ ${COINS} != "null" && $(echo "$COINS > 0" | bc -l) -eq 1 ]]; then
|
||||
|
||||
[[ ! -s ~/.zen/tmp/${MOATS}/${G1PUB}.g1history.json ]] \
|
||||
&& ${MY_PATH}/timeout.sh -t 20 $MY_PATH/jaklis/jaklis.py history -n 100 -p ${G1PUB} -j > ~/.zen/tmp/${MOATS}/${G1PUB}.g1history.json
|
||||
&& ${MY_PATH}/timeout.sh -t 5 $MY_PATH/jaklis/jaklis.py history -n 100 -p ${G1PUB} -j > ~/.zen/tmp/${MOATS}/${G1PUB}.g1history.json
|
||||
echo "++ HISTORY OK"
|
||||
|
||||
fi
|
||||
|
||||
## SCAN GCHANGE +
|
||||
if [[ ! -s ~/.zen/tmp/coucou/${G1PUB}.gchange.json ]]; then
|
||||
${MY_PATH}/timeout.sh -t 20 curl -s ${myDATA}/user/profile/${G1PUB} > ~/.zen/tmp/${MOATS}/${G1PUB}.gchange.json
|
||||
${MY_PATH}/timeout.sh -t 5 curl -s ${myDATA}/user/profile/${G1PUB} > ~/.zen/tmp/${MOATS}/${G1PUB}.gchange.json
|
||||
GFOUND=$(cat ~/.zen/tmp/${MOATS}/${G1PUB}.gchange.json 2>/dev/null | jq -r '.found')
|
||||
|
||||
if [[ ! $GFOUND || $GFOUND == "false" ]]; then
|
||||
|
@ -56,7 +56,7 @@ fi
|
|||
## SCAN CESIUM +
|
||||
if [[ ! -s ~/.zen/tmp/coucou/${G1PUB}.cesium.json ]]; then
|
||||
|
||||
${MY_PATH}/timeout.sh -t 10 curl -s ${myCESIUM}/user/profile/${G1PUB} > ~/.zen/tmp/${MOATS}/${G1PUB}.cesium.json 2>/dev/null
|
||||
${MY_PATH}/timeout.sh -t 5 curl -s ${myCESIUM}/user/profile/${G1PUB} > ~/.zen/tmp/${MOATS}/${G1PUB}.cesium.json 2>/dev/null
|
||||
GCFOUND=$(cat ~/.zen/tmp/${MOATS}/${G1PUB}.cesium.json 2>/dev/null | jq -r '.found')
|
||||
|
||||
if [[ ! $GCFOUND || $GCFOUND == "false" ]]; then
|
||||
|
@ -80,7 +80,7 @@ if [[ ! -s ~/.zen/tmp/coucou/${G1PUB}.cplus.json ]]; then
|
|||
if [[ $CPLUS != "" && $CPLUS != 'null' && $CPLUS != $G1PUB ]]; then
|
||||
|
||||
echo "SCAN GPLUS CESIUM + ACCOUNT"
|
||||
${MY_PATH}/timeout.sh -t 10 curl -s ${myCESIUM}/user/profile/${CPLUS} > ~/.zen/tmp/${MOATS}/${G1PUB}.cplus.json 2>/dev/null
|
||||
${MY_PATH}/timeout.sh -t 5 curl -s ${myCESIUM}/user/profile/${CPLUS} > ~/.zen/tmp/${MOATS}/${G1PUB}.cplus.json 2>/dev/null
|
||||
|
||||
CCFOUND=$(cat ~/.zen/tmp/${MOATS}/${G1PUB}.cplus.json | jq -r '.found')
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bah
|
||||
#!/bin/bash
|
||||
##################################################
|
||||
## Get TODATE G1PUB & IPNS values for LAT / LON
|
||||
##################################################
|
||||
|
@ -14,30 +14,41 @@ LON="$2"
|
|||
ZLAT=$(makecoord ${LAT})
|
||||
ZLON=$(makecoord ${LON})
|
||||
## CHECK
|
||||
[[ "$ZLAT" != "$LAT" ]] && echo "ERROR - LAT bad format -" && exit 1
|
||||
[[ "$ZLON" != "$LON" ]] && echo "ERROR - LON bad format -" && exit 1
|
||||
[[ "$ZLAT" != "$LAT" ]] && echo "ERROR - $LAT bad format -" && exit 1
|
||||
[[ "$ZLON" != "$LON" ]] && echo "ERROR - $LON bad format -" && exit 1
|
||||
|
||||
## CONTINUE
|
||||
echo "UMAP : _${LAT}_${LON}"
|
||||
## COMPUTE UMAP, USECTOR, UREGION
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
echo "SECTOR : _${SLAT}_${SLON}"
|
||||
RLAT="$(echo ${LAT} | cut -d '.' -f 1)"
|
||||
RLON="$(echo ${LAT} | cut -d '.' -f 1)"
|
||||
RLON="$(echo ${LON} | cut -d '.' -f 1)"
|
||||
|
||||
## GET ENV
|
||||
echo "UMAP : _${LAT}_${LON}"
|
||||
UMAPG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB 2>/dev/null | tail -n 1)
|
||||
[[ ! $UMAPG1PUB ]] && UMAPG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB 2>/dev/null | tail -n 1)
|
||||
[[ ! $UMAPG1PUB ]] && echo "NO UMAP FOUND" && exit 0
|
||||
echo "UMAPG1PUB=$UMAPG1PUB"
|
||||
UMAPIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS 2>/dev/null | tail -n 1)
|
||||
[[ $UMAPIPNS == "/ipns/" ]] && UMAPIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS 2>/dev/null | tail -n 1)
|
||||
echo "UMAPIPNS=$UMAPIPNS"
|
||||
|
||||
echo "SECTOR : _${SLAT}_${SLON}"
|
||||
SECTORG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORG1PUB 2>/dev/null | tail -n 1)
|
||||
[[ ! $SECTORG1PUB ]] && SECTORG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORG1PUB 2>/dev/null | tail -n 1)
|
||||
echo "SECTORG1PUB=$SECTORG1PUB"
|
||||
SECTORIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORNS 2>/dev/null | tail -n 1)
|
||||
[[ $SECTORIPNS == "/ipns/" ]] && SECTORIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORNS 2>/dev/null | tail -n 1)
|
||||
echo "SECTORIPNS=$SECTORIPNS"
|
||||
|
||||
echo "REGION : _${RLAT}_${RLON}"
|
||||
REGIONG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONG1PUB 2>/dev/null | tail -n 1)
|
||||
[[ ! $REGIONG1PUB ]] && REGIONG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONG1PUB 2>/dev/null | tail -n 1)
|
||||
echo "REGIONG1PUB=$REGIONG1PUB"
|
||||
REGIONIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONNS 2>/dev/null | tail -n 1)
|
||||
[[ $REGIONIPNS == "/ipns/" ]] && REGIONIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONNS 2>/dev/null | tail -n 1)
|
||||
echo "REGIONIPNS=$REGIONIPNS"
|
||||
|
||||
## COMPUTE
|
||||
UMAPIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS | tail -n 1)
|
||||
[[ ! $UMAPIPNS ]] && UMAPIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS | tail -n 1)
|
||||
UMAPG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB | tail -n 1)
|
||||
[[ ! $UMAPG1PUB ]] && UMAPG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB | tail -n 1)
|
||||
|
||||
SECTORIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORNS | tail -n 1)
|
||||
[[ ! $SECTORIPNS ]] && SECTORIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORNS | tail -n 1)
|
||||
SECTORG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $SECTORG1PUB ]] && SECTORG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORG1PUB | tail -n 1)
|
||||
|
||||
REGIONIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}REGIONNS | tail -n 1)
|
||||
[[ ! $REGIONIPNS ]] && REGIONIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONNS | tail -n 1)
|
||||
REGIONG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONG1PUB | tail -n 1)
|
||||
[[ ! $REGIONG1PUB ]] && REGIONG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}REGIONG1PUB | tail -n 1)
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue