forked from STI/Astroport.ONE
pffff
This commit is contained in:
parent
855d2877f5
commit
3eddcad0eb
16
API/ZONE.sh
16
API/ZONE.sh
@ -76,11 +76,11 @@ LAT=$LAT LON=$LON SLAT=$SLAT SLON=$SLON RLAT=$RLAT RLON=$RLON"
|
|||||||
SECTOR="_${SLAT}_${SLON}"
|
SECTOR="_${SLAT}_${SLON}"
|
||||||
echo "SECTOR = ${SECTOR}"
|
echo "SECTOR = ${SECTOR}"
|
||||||
ZONEINDEX=$SECTORIPNS
|
ZONEINDEX=$SECTORIPNS
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORNS | tail -n 1)
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORNS | tail -n 1)
|
||||||
ZONEG1PUB=$SECTORG1PUB
|
ZONEG1PUB=$SECTORG1PUB
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORG1PUB | tail -n 1)
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORG1PUB | tail -n 1)
|
||||||
LAT=${SLAT}
|
LAT=${SLAT}
|
||||||
LON=${SLON}
|
LON=${SLON}
|
||||||
JSON="ZONE${SECTOR}_${DEG}.json"
|
JSON="ZONE${SECTOR}_${DEG}.json"
|
||||||
@ -95,11 +95,11 @@ LAT=$LAT LON=$LON SLAT=$SLAT SLON=$SLON RLAT=$RLAT RLON=$RLON"
|
|||||||
REGION="_${RLAT}_${RLON}"
|
REGION="_${RLAT}_${RLON}"
|
||||||
echo "REGION = ${REGION}"
|
echo "REGION = ${REGION}"
|
||||||
ZONEINDEX=$REGIONIPNS
|
ZONEINDEX=$REGIONIPNS
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||||
ZONEG1PUB=$REGIONG1PUB
|
ZONEG1PUB=$REGIONG1PUB
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${RLAT}_${RLON}/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||||
LAT=${RLAT}
|
LAT=${RLAT}
|
||||||
LON=${RLON}
|
LON=${RLON}
|
||||||
JSON="ZONE${REGION}_${DEG}.json"
|
JSON="ZONE${REGION}_${DEG}.json"
|
||||||
|
@ -67,7 +67,7 @@ while read JSONUPLANET; do
|
|||||||
|
|
||||||
echo "JSONUPLANET=${JSONUPLANET}"
|
echo "JSONUPLANET=${JSONUPLANET}"
|
||||||
|
|
||||||
UPNAME=$(echo ${JSONUPLANET} | jq .title) # What name is given ?
|
UPNAME=$(echo ${JSONUPLANET} | jq -r ".title") # What name is given ?
|
||||||
[[ "${UPNAME}" == "null" || "${UPNAME}" == "" ]] && echo "FATAL ERROR UPNAME .title MISSING" && exit 1
|
[[ "${UPNAME}" == "null" || "${UPNAME}" == "" ]] && echo "FATAL ERROR UPNAME .title MISSING" && exit 1
|
||||||
HASH=$(echo ${JSONUPLANET} | jq -r ".hash") ## What text hash it has ?
|
HASH=$(echo ${JSONUPLANET} | jq -r ".hash") ## What text hash it has ?
|
||||||
[[ "${HASH}" == "null" || "${HASH}" == "" ]] && echo "FATAL ERROR UPNAME .hash MISSING" && exit 1
|
[[ "${HASH}" == "null" || "${HASH}" == "" ]] && echo "FATAL ERROR UPNAME .hash MISSING" && exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user