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})
|
||||
JSON="ZONE_${LAT}_${LON}_${DEG}.json"
|
||||
|
||||
[[ $(date +"%H%M") -gt 2012 ]] \
|
||||
&& THEDATE=${TODATE} \
|
||||
|| THEDATE=${YESTERDATE}
|
||||
echo "${THEDATE}"
|
||||
|
||||
|
||||
## SECTOR LEVEL
|
||||
if [[ ${DEG} == "0.01" ]]; then
|
||||
SECLAT="${LAT::-1}"
|
||||
SECLON="${LON::-1}"
|
||||
SECTOR="_${SECLAT}_${SECLON}"
|
||||
echo "SECTOR = ${SECTOR}"
|
||||
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORNS | tail -n 1)
|
||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/SECTORG1PUB | tail -n 1)
|
||||
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORNS | tail -n 1)
|
||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORG1PUB | tail -n 1)
|
||||
JSON="ZONE${SECTOR}_${DEG}.json"
|
||||
|
||||
fi
|
||||
|
@ -89,8 +83,8 @@ echo "${THEDATE}"
|
|||
LON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
ZONE="_${LAT}_${LON}"
|
||||
echo "ZONE = ${ZONE}"
|
||||
ZONEINDEX=$(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="/ipns/"$(cat ~/.zen/tmp/swarm/*/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 ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONG1PUB | tail -n 1)
|
||||
JSON="ZONE${ZONE}_${DEG}.json"
|
||||
|
@ -124,7 +118,7 @@ if [[ ! -s ~/.zen/tmp/${JSON} ]]; then
|
|||
|
||||
rm -Rf ~/.zen/tmp/${MOATS}/
|
||||
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
|
||||
|
||||
fi
|
||||
|
|
|
@ -131,7 +131,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
|||
echo "</body></html>" >> ~/.zen/tmp/result
|
||||
|
||||
|
||||
[[ $try == 0 ]] \
|
||||
[[ $try == 0 && "${CURRENT}" != "${PLAYER}" ]] \
|
||||
&& echo "PLAYER ${PLAYER} UNPLUG" \
|
||||
&& ${MY_PATH}/PLAYER.unplug.sh ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ${PLAYER} "ALL" \
|
||||
&& continue
|
||||
|
@ -206,7 +206,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
|||
|
||||
################################################## +7 DAYS 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" \
|
||||
&& echo "(#__#) AstroID +7 DAYS = SECURITY ERROR (#__#)" && continue
|
||||
|
||||
|
@ -533,7 +533,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
|||
|
||||
########################################################
|
||||
#### 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 --"
|
||||
## DEAD PLAYER ??
|
||||
if [[ ${DIFF_SECONDS} -eq $(( 27 * 24 * 60 * 60 )) ]]; then
|
||||
|
|
Loading…
Reference in New Issue