UPlanet KEYS Flash Mem process
This commit is contained in:
parent
c2e9655e75
commit
17dca2cafc
|
@ -87,10 +87,17 @@ fi
|
||||||
###############################################################################
|
###############################################################################
|
||||||
if [[ ${QRCODE} == "station" ]]; then
|
if [[ ${QRCODE} == "station" ]]; then
|
||||||
|
|
||||||
|
## CHECK FOR ANY ALREADY RUNNING make_image_ipfs_index_carousel
|
||||||
|
carouselrunning=$(ps axf --sort=+utime | grep -w 'make_image_ipfs_index_carousel' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||||
|
|
||||||
if [[ ! -s ~/.zen/tmp/ISTATION ]]; then
|
if [[ ! -s ~/.zen/tmp/ISTATION ]]; then
|
||||||
## GENERATE PLAYER G1 TO ZEN ACCOUNTING
|
if [[ $carouselrunning ]]; then
|
||||||
ISTATION=$($MY_PATH/../tools/make_image_ipfs_index_carousel.sh | tail -n 1)
|
ISTATION="/ipfs/QmVTHH8sTXEqRBsvcKo5jDo16rvp7Q7ERyHZP5vmWUxeS6" ## G1WorldCrafting.jpg
|
||||||
echo $ISTATION > ~/.zen/tmp/ISTATION ## STATION G1WALLET CAROUSEL
|
else
|
||||||
|
## GENERATE PLAYER G1 TO ZEN ACCOUNTING
|
||||||
|
ISTATION=$($MY_PATH/../tools/make_image_ipfs_index_carousel.sh | tail -n 1)
|
||||||
|
echo $ISTATION > ~/.zen/tmp/ISTATION ## STATION G1WALLET CAROUSEL
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ISTATION=$(cat ~/.zen/tmp/ISTATION)
|
ISTATION=$(cat ~/.zen/tmp/ISTATION)
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/bash
|
||||||
|
########################################################################
|
||||||
|
# Version: 0.1
|
||||||
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||||
|
########################################################################
|
||||||
|
## EXPLORE SWARM MAPNS
|
||||||
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
|
ME="${0##*/}"
|
||||||
|
|
||||||
|
## LOG into ~/.zen/tmp/_12345.log
|
||||||
|
exec 2>&1 >> ~/.zen/tmp/_12345.log
|
||||||
|
|
||||||
|
echo "(◕‿◕ ) ${ME} (◕‿◕ ) "
|
||||||
|
|
||||||
|
WKEYS=($(cat ~/.zen/tmp/swarm/12D*/UPLANET/__/_*_*/_*.?_*.?/_*.??_*.??/_index.html | grep -o "url='/[^']*'"| sed "s/url='\(.*\)'/\1/" | awk -F"/" '{print $3}' | shuf ))
|
||||||
|
echo ${#WKEYS[@]} " UMAPS"
|
||||||
|
SKEYS=($(cat ~/.zen/tmp/swarm/12D*/UPLANET/SECTORS/_*_*/_*.?_*.?/_index.html | grep -o "url='/[^']*'"| sed "s/url='\(.*\)'/\1/" | awk -F"/" '{print $3}' | shuf ))
|
||||||
|
echo ${#SKEYS[@]} " SECTORS"
|
||||||
|
RKEYS=($(cat ~/.zen/tmp/swarm/12D*/UPLANET/REGIONS/_*_*/_index.html | grep -o "url='/[^']*'"| sed "s/url='\(.*\)'/\1/" | awk -F"/" '{print $3}' | shuf ))
|
||||||
|
echo ${#RKEYS[@]} " REGIONS"
|
||||||
|
|
||||||
|
## CHECK FOR ANY ALREADY MErunning
|
||||||
|
MErunning=$(ps axf --sort=+utime | grep -w ${ME} | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||||
|
[[ $MErunning ]] && echo "${ME} MErunning for too long..." && kill -9 $MErunning
|
||||||
|
|
||||||
|
echo "(◕‿◕ ) ${ME} starting UPlanet Terraformation _______________________________"
|
||||||
|
|
||||||
|
combined=("${WKEYS[@]}" "${SKEYS[@]}" "${RKEYS[@]}")
|
||||||
|
UKEYS=($(echo "${combined[@]}" | tr ' ' '\n' | sort -u))
|
||||||
|
echo ${#UKEYS[@]} " JOBS..."
|
||||||
|
|
||||||
|
## STORAGE FOR IPFS GET on UPLANET KEYS
|
||||||
|
mkdir -p ~/.zen/tmp/flashmem
|
||||||
|
|
||||||
|
floop=0
|
||||||
|
medo=0
|
||||||
|
|
||||||
|
for key in ${UKEYS[@]}; do
|
||||||
|
rm -Rf ~/.zen/tmp/flashmem
|
||||||
|
echo "ipfs --timeout 30s get -o ~/.zen/tmp/flashmem /ipns/$key"
|
||||||
|
ipfs --timeout 30s get -o ~/.zen/tmp/flashmem /ipns/$key
|
||||||
|
[ $! -eq 0 ] && medo=$((medo +1))
|
||||||
|
floop=$((floop +1))
|
||||||
|
[ $floop -gt 100 ] && break
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "(◕‿◕ ) ${ME} :: $medo SUCCESS over $floop KEYS from ${#UKEYS[@]} JOBS"
|
|
@ -81,9 +81,12 @@ while true; do
|
||||||
## FIXING TIC TAC FOR NODE & SWARM REFRESH ( 1H )
|
## FIXING TIC TAC FOR NODE & SWARM REFRESH ( 1H )
|
||||||
if [[ ${duree} -gt 3600000 ]]; then
|
if [[ ${duree} -gt 3600000 ]]; then
|
||||||
|
|
||||||
|
|
||||||
|
#### UPLANET FLASHMEM UPDATES
|
||||||
|
${MY_PATH}/UPlanetKEYS_refresh.sh &
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
( ##### SUB-PROCESS RUN
|
( ##### SUB-PROCESS £
|
||||||
exec 2>&1 >> ~/.zen/tmp/_12345.log
|
|
||||||
start=`date +%s`
|
start=`date +%s`
|
||||||
|
|
||||||
# MONITOR pending
|
# MONITOR pending
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
## EXPLORE SWARM MAPNS
|
|
||||||
echo "World UMAPS"
|
|
||||||
cat ~/.zen/tmp/swarm/12D*/UPLANET/__/_*_*/_*.?_*.?/_*.??_*.??/_index.html
|
|
||||||
|
|
||||||
|
|
||||||
echo "World SECTORS"
|
|
||||||
cat ~/.zen/tmp/swarm/12D*/UPLANET/SECTORS/_*_*/_*.?_*.?/_index.html
|
|
||||||
|
|
||||||
|
|
||||||
echo "World REGIONS"
|
|
||||||
cat ~/.zen/tmp/swarm/12D*/UPLANET/REGIONS/_*_*/_index.html
|
|
Loading…
Reference in New Issue