help webcam loading

This commit is contained in:
fred 2024-01-10 17:05:01 +01:00
parent 0871685d1b
commit 0049ee502c
4 changed files with 22 additions and 13 deletions

View File

@ -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 <h2>${ZCHK}:${QRCODE}</h2><h1>${DISPLAY}</h1>" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
echo "$HTTPCORS <h2>${ZCHK}:${QRCODE}</h2><h1>${DISPLAY}</h1><h2><a href='$myUPLANET/g1gate/?pubkey=$G1PUB'>SCAN WALLET</a><h2>" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
echo "BLURP ${DISPLAY} $PORT" && rm -Rf ~/.zen/tmp/${MOATS}
) &

View File

@ -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 "<html><body><h1>WARNING.</h1> Your TW will be UNPLUGGED and stop being published..." > ~/.zen/tmp/alert \
&& echo "<br><h3>TW : <a href=$(myIpfsGw)/ipfs/${CURCHAIN}> ${PLAYER}</a></h3></body></html>" >> ~/.zen/tmp/alert \
&& echo "<br><h3>TW : <a href=$(myIpfsGw)/ipfs/${CURCHAIN}> ${PLAYER}</a></h3>ZEN=$ZEN </body></html>" >> ~/.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

View File

@ -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)

View File

@ -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.
########################################