donot unplug CURRENT
This commit is contained in:
parent
b3d66ffd58
commit
42f6fdc39f
20
API/ZONE.sh
20
API/ZONE.sh
|
@ -63,22 +63,16 @@ LAT=$(makecoord ${LAT})
|
||||||
LON=$(makecoord ${LON})
|
LON=$(makecoord ${LON})
|
||||||
JSON="ZONE_${LAT}_${LON}_${DEG}.json"
|
JSON="ZONE_${LAT}_${LON}_${DEG}.json"
|
||||||
|
|
||||||
[[ $(date +"%H%M") -gt 2012 ]] \
|
|
||||||
&& THEDATE=${TODATE} \
|
|
||||||
|| THEDATE=${YESTERDATE}
|
|
||||||
echo "${THEDATE}"
|
|
||||||
|
|
||||||
|
|
||||||
## SECTOR LEVEL
|
## SECTOR LEVEL
|
||||||
if [[ ${DEG} == "0.01" ]]; then
|
if [[ ${DEG} == "0.01" ]]; then
|
||||||
SECLAT="${LAT::-1}"
|
SECLAT="${LAT::-1}"
|
||||||
SECLON="${LON::-1}"
|
SECLON="${LON::-1}"
|
||||||
SECTOR="_${SECLAT}_${SECLON}"
|
SECTOR="_${SECLAT}_${SECLON}"
|
||||||
echo "SECTOR = ${SECTOR}"
|
echo "SECTOR = ${SECTOR}"
|
||||||
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORNS | tail -n 1)
|
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORNS | tail -n 1)
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORNS | tail -n 1)
|
||||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORG1PUB | tail -n 1)
|
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORG1PUB | tail -n 1)
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORG1PUB | tail -n 1)
|
||||||
JSON="ZONE${SECTOR}_${DEG}.json"
|
JSON="ZONE${SECTOR}_${DEG}.json"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -89,8 +83,8 @@ echo "${THEDATE}"
|
||||||
LON=$(echo ${LON} | cut -d '.' -f 1)
|
LON=$(echo ${LON} | cut -d '.' -f 1)
|
||||||
ZONE="_${LAT}_${LON}"
|
ZONE="_${LAT}_${LON}"
|
||||||
echo "ZONE = ${ZONE}"
|
echo "ZONE = ${ZONE}"
|
||||||
ZONEINDEX=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONNS | tail -n 1)
|
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONNS | tail -n 1)
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONNS | tail -n 1)
|
||||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONG1PUB | tail -n 1)
|
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONG1PUB | tail -n 1)
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONG1PUB | tail -n 1)
|
||||||
JSON="ZONE${ZONE}_${DEG}.json"
|
JSON="ZONE${ZONE}_${DEG}.json"
|
||||||
|
@ -124,7 +118,7 @@ if [[ ! -s ~/.zen/tmp/${JSON} ]]; then
|
||||||
|
|
||||||
rm -Rf ~/.zen/tmp/${MOATS}/
|
rm -Rf ~/.zen/tmp/${MOATS}/
|
||||||
end=`date +%s`
|
end=`date +%s`
|
||||||
echo "(UMAP)_${LAT}_${LON} ${THEDATE} $UMAPNS Operation time was "`expr $end - $start` seconds.
|
echo "(UMAP)_${LAT}_${LON} $UMAPNS Operation time was "`expr $end - $start` seconds.
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -131,7 +131,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||||
echo "</body></html>" >> ~/.zen/tmp/result
|
echo "</body></html>" >> ~/.zen/tmp/result
|
||||||
|
|
||||||
|
|
||||||
[[ $try == 0 ]] \
|
[[ $try == 0 && "${CURRENT}" != "${PLAYER}" ]] \
|
||||||
&& echo "PLAYER ${PLAYER} UNPLUG" \
|
&& echo "PLAYER ${PLAYER} UNPLUG" \
|
||||||
&& ${MY_PATH}/PLAYER.unplug.sh ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ${PLAYER} "ALL" \
|
&& ${MY_PATH}/PLAYER.unplug.sh ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ${PLAYER} "ALL" \
|
||||||
&& continue
|
&& continue
|
||||||
|
@ -206,7 +206,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||||
|
|
||||||
################################################## +7 DAYS AstroID !!
|
################################################## +7 DAYS AstroID !!
|
||||||
## REMOVE TW OLDER THAN 7 DAYS WITH AstroID
|
## REMOVE TW OLDER THAN 7 DAYS WITH AstroID
|
||||||
[[ -s ~/.zen/tmp/${MOATS}/AstroID.json && $days -gt 7 ]] \
|
[[ -s ~/.zen/tmp/${MOATS}/AstroID.json && $days -gt 7 && "${CURRENT}" != "${PLAYER}" ]] \
|
||||||
&& ${MY_PATH}/PLAYER.unplug.sh "${HOME}/.zen/game/players/${PLAYER}/ipfs/moa/index.html" "${PLAYER}" "ALL" \
|
&& ${MY_PATH}/PLAYER.unplug.sh "${HOME}/.zen/game/players/${PLAYER}/ipfs/moa/index.html" "${PLAYER}" "ALL" \
|
||||||
&& echo "(#__#) AstroID +7 DAYS = SECURITY ERROR (#__#)" && continue
|
&& echo "(#__#) AstroID +7 DAYS = SECURITY ERROR (#__#)" && continue
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
#### PLAYER ACCOUNT HAVE NEW TIDDLER or NOT #########
|
#### PLAYER ACCOUNT HAVE NEW TIDDLER or NOT #########
|
||||||
if [[ $(cat ~/.zen/game/players/${PLAYER}/ipfs/${PLAYER}.rss.json) == "[]" ]]; then
|
if [[ $(cat ~/.zen/game/players/${PLAYER}/ipfs/${PLAYER}.rss.json) == "[]" && "${CURRENT}" != "${PLAYER}" ]]; then
|
||||||
echo "ALERT -- RSS IS EMPTY -- COINS=$COINS / ZEN=$ZEN --"
|
echo "ALERT -- RSS IS EMPTY -- COINS=$COINS / ZEN=$ZEN --"
|
||||||
## DEAD PLAYER ??
|
## DEAD PLAYER ??
|
||||||
if [[ ${DIFF_SECONDS} -eq $(( 27 * 24 * 60 * 60 )) ]]; then
|
if [[ ${DIFF_SECONDS} -eq $(( 27 * 24 * 60 * 60 )) ]]; then
|
||||||
|
|
Loading…
Reference in New Issue