From 0049ee502cd9fe412e152e8458b1665b1d93153e Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 10 Jan 2024 17:05:01 +0100 Subject: [PATCH] help webcam loading --- API/QRCODE.sh | 12 ++++++------ RUNTIME/PLAYER.refresh.sh | 8 +++++--- tools/PAY4SURE.sh | 4 ++-- tools/my.sh | 11 +++++++++-- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 9439b4734..d8b33e02e 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -100,20 +100,20 @@ if [[ ${QRCODE} == "station" ]]; then ISTATION=$(cat ~/.zen/tmp/ISTATION) fi ## SHOW G1PALPAY FRONT (IFRAME) - sed "s~_STATION_~${myIPFS}${ISTATION}/~g" $MY_PATH/../templates/ZenStation/index.html > ~/.zen/tmp/${MOATS}/index.htm + sed "s~_STATION_~${myIPFSW}${ISTATION}/~g" $MY_PATH/../templates/ZenStation/index.html > ~/.zen/tmp/${MOATS}/index.htm [[ ! $isLAN ]] && sed -i "s~MENU~HOSTING~g" ~/.zen/tmp/${MOATS}/index.htm - sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/${MOATS}/index.htm + sed -i "s~http://127.0.0.1:8080~${myIPFSW}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://127.0.0.1:33101~${myG1BILLET}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://astroport.localhost:1234~${myASTROPORT}~g" ~/.zen/tmp/${MOATS}/index.htm WSTATION="/ipfs/$(ipfs add -q ~/.zen/tmp/${MOATS}/index.htm)" echo $WSTATION > ~/.zen/tmp/WSTATION end=`date +%s` - echo "NEW WSTATION ${myIPFS}${WSTATION} Execution time was "`expr $end - $start` seconds. + echo "NEW WSTATION ${myIPFSW}${WSTATION} Execution time was "`expr $end - $start` seconds. ## SEND TO WSTATION PAGE - sed "s~_TWLINK_~${myIPFS}${WSTATION}/~g" ${MY_PATH}/../templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect + sed "s~_TWLINK_~${myIPFSW}${WSTATION}/~g" ${MY_PATH}/../templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect sed -i "s~Set-Cookie*~Set-Cookie: $COOKIE~" ~/.zen/tmp/${MOATS}/index.redirect - echo "url='"${myIPFS}${WSTATION}"'" >> ~/.zen/tmp/${MOATS}/index.redirect + echo "url='"${myIPFSW}${WSTATION}"'" >> ~/.zen/tmp/${MOATS}/index.redirect ( cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 echo "BLURP $PORT" && rm -Rf ~/.zen/tmp/${MOATS} @@ -696,7 +696,7 @@ echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPNS" ## WE SEND WALLET AMOUNT DISPLAY ( - echo "$HTTPCORS

${ZCHK}:${QRCODE}

${DISPLAY}

" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 + echo "$HTTPCORS

${ZCHK}:${QRCODE}

${DISPLAY}

SCAN WALLET

" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 echo "BLURP ${DISPLAY} $PORT" && rm -Rf ~/.zen/tmp/${MOATS} ) & diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index 35307b609..1036ef8d2 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -330,17 +330,19 @@ for PLAYER in ${PLAYERONE[@]}; do ################################## #### PLAYER ACCOUNT CLEANING ######### - ## CHECK FOR EMPTY RSS + 30 DAYS BIRTHDATE + null G1 + ## IF ZEN < 11 + ## && EMPTY RSS + 30 DAYS BIRTHDATE + ## ==> UNPLUG [[ $(cat ~/.zen/game/players/${PLAYER}/ipfs/${PLAYER}.rss.json) == "[]" ]] \ && echo "RSS IS EMPTY -- COINS=$COINS / ZEN=$ZEN --" \ && [[ $(echo "$COINS < 2.1" | bc -l) -eq 1 ]] \ && [[ ${DIFF_SECONDS} -gt $(( 27 * 24 * 60 * 60 )) ]] \ && echo "

WARNING.

Your TW will be UNPLUGGED and stop being published..." > ~/.zen/tmp/alert \ - && echo "

TW : ${PLAYER}

" >> ~/.zen/tmp/alert \ + && echo "

TW : ${PLAYER}

ZEN=$ZEN " >> ~/.zen/tmp/alert \ && ${MY_PATH}/../tools/mailjet.sh "${PLAYER}" ~/.zen/tmp/alert \ && echo "<<<< PLAYER TW WARNING <<<< ${DIFF_SECONDS} > ${days} days" \ && [[ ${DIFF_SECONDS} -gt $(( 30 * 24 * 60 * 60 )) ]] \ - && echo ">>>> PLAYER TW UNPLUG >>>>> ${days} days => BYE BYE ${PLAYER}" \ + && echo ">>>> PLAYER TW UNPLUG >>>>> ${days} days => BYE BYE ${PLAYER} ZEN=$ZEN" \ && ${MY_PATH}/../tools/PLAYER.unplug.sh ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ${PLAYER} \ && continue #################################### UNPLUG ACCOUNT diff --git a/tools/PAY4SURE.sh b/tools/PAY4SURE.sh index 980fd94b3..352f4ef8b 100755 --- a/tools/PAY4SURE.sh +++ b/tools/PAY4SURE.sh @@ -69,10 +69,10 @@ rm -f ${PENDINGDIR}/${MOATS}.result ################################################ # MAKE PAYMENT ${MY_PATH}/jaklis/jaklis.py -k ${PENDINGDIR}/secret.key pay -a ${AMOUNT} -p ${G1PUB} -c "${COMMENT}" -m 2>&1> ${PENDINGDIR}/${MOATS}.result -CHK=$(cat ${PENDINGDIR}/${MOATS}.result | head -n 1 ) +CHK=$(cat ${PENDINGDIR}/${MOATS}.result | head -n 2 ) echo ${CHK} -if [ $? == 0 || ${CHK} == 'Le document généré est conforme.' ]; then +if [ $? == 0 || $(echo "${CHK}" | grep 'succès') ]; then echo "SENT" > ${PENDINGFILE} ## TODO : MONITOR POTENTIAL CHAIN REJECTION (FORK/MERGE WINDOW) diff --git a/tools/my.sh b/tools/my.sh index 1855ce5ca..c6ddb4fa4 100755 --- a/tools/my.sh +++ b/tools/my.sh @@ -437,7 +437,7 @@ myIP="$(myIp)" # "127.0.0.1" myIP=$(hostname -I | awk '{print $1}' | head -n 1) isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/") -myASTROPORT="http://$(hostname).local:1234" #astroport.localhost +myASTROPORTW="http://$(hostname).local:1234" #astroport.localhost myASTROPORT="http://${myIP}:1234" # BE ACCESSIBLE THROUGH LAN myAPI="http://${myIP}:5001" myDATA="https://data.gchange.fr" @@ -446,7 +446,7 @@ myCESIUM="https://g1.data.e-is.pro" myG1BILLET="http://${myIP}:33101" myHOST="$(myHostName)" -myIPFS="http://$(hostname).local:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. +myIPFSW="http://$(hostname).local:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. myIPFS="http://${myIP}:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. myIPFSGW="$(myIpfsGw)" myTUBE="$(myTube)" @@ -494,3 +494,10 @@ myLIBRA="https://ipfs.asycn.io" ## READ IPFS GATEWAY [ -n "$(UPlanetSharedSecret)" ] \ && UPLANETNAME="$(UPlanetSharedSecret)" \ || UPLANETNAME="" + +## DEV fred@g1sms.fr UPlanet World Keeper. +[[ ${UPLANETNAME} == "" ]] && WORLDG1PUB="EniaswqLCeWRJfz39VJRQwC6QDbAhkRHV9tn2fjhcrnc" +## when UPlanetSharedSecret is set. +## All TW wallet are created with 1 G1 "primal transaction" +## making UPlanet blockchains secured. +########################################