Do not run if no player

This commit is contained in:
fred 2024-03-06 02:00:49 +01:00
parent 8be2fb525b
commit 1c8b16a9de
1 changed files with 3 additions and 3 deletions

View File

@ -85,6 +85,9 @@ while true; do
## FIXING TIC TAC FOR NODE & SWARM REFRESH ( 1H )
if [[ ${duree} -gt 3600000 ]]; then
PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null))
[[ ${PLAYERONE[@]} == "" ]] && echo "EMPTY ASTROPORT - NO PLAYER - NO PUBLISHING" && continue
## CHECK IF IPFS NODE IS RESPONDING
ipfs --timeout=30s swarm peers 2>/dev/null > ~/.zen/tmp/ipfs.swarm.peers
[[ ! -s ~/.zen/tmp/ipfs.swarm.peers || $? != 0 ]] \
@ -97,9 +100,6 @@ while true; do
#### UPLANET FLASHMEM UPDATES
${MY_PATH}/RUNTIME/UPlanetKEYS_refresh.sh &
PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null))
[[ ${PLAYERONE[@]} == "" ]] && echo "EMPTY ASTROPORT - NO PLAYER - NO PUBLISHING" && continue
#####################################
( ##### SUB-PROCESS £
start=`date +%s`