From 9aadaa4e55fc20df4bd66e6ce142097dba82206a Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 17 Oct 2023 21:30:38 +0200 Subject: [PATCH] coucou only for COINS and not served PORT --- 12345.sh | 14 +++++++------- API/QRCODE.sh | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/12345.sh b/12345.sh index a57cd4ce..c2129151 100755 --- a/12345.sh +++ b/12345.sh @@ -88,24 +88,24 @@ while true; do ############### ############### ############### ############### templates/index.http # REPLACE myHOST in http response template (fixing next API meeting point) - echo "$HTTPCORS" > ~/.zen/tmp/coucou/${MOATS}.myHOST.http - myHtml >> ~/.zen/tmp/coucou/${MOATS}.myHOST.http + echo "$HTTPCORS" > ~/.zen/tmp/coucou/${PORT}.myHOST.http + myHtml >> ~/.zen/tmp/coucou/${PORT}.myHOST.http ## REPLACE RESPONSE PORT sed -i -e "s~http://127.0.0.1:12345~http://${myIP}:${PORT}~g" \ - ~/.zen/tmp/coucou/${MOATS}.myHOST.http + ~/.zen/tmp/coucou/${PORT}.myHOST.http ## WAN REDIRECT TO HTTPS:// + /${PORT} [ -z "$isLAN" ] \ - && sed -i -e "s~http://${myIP}:${PORT}~${myASTROPORT}/${PORT}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http + && sed -i -e "s~http://${myIP}:${PORT}~${myASTROPORT}/${PORT}~g" ~/.zen/tmp/coucou/${PORT}.myHOST.http ## UPLANET HOME LINK REPLACEMENT - sed -i -e "s~https://ipfs.copylaradio.com/ipns/copylaradio.com~${myUPLANET}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http + sed -i -e "s~https://ipfs.copylaradio.com/ipns/copylaradio.com~${myUPLANET}~g" ~/.zen/tmp/coucou/${PORT}.myHOST.http ############################################################################ - ## SERVE LANDING REDIRECT PAGE ~/.zen/tmp/coucou/${MOATS}.myHOST.http on PORT 1234 (LOOP BLOCKING POINT) + ## SERVE LANDING REDIRECT PAGE ~/.zen/tmp/coucou/${PORT}.myHOST.http on PORT 1234 (LOOP BLOCKING POINT) ############################################################################ - REQ=$(cat $HOME/.zen/tmp/coucou/${MOATS}.myHOST.http | nc -l -p 1234 -q 1 && rm $HOME/.zen/tmp/coucou/${MOATS}.myHOST.http) ## # WAIT FOR 1234 PORT CONTACT + REQ=$(cat $HOME/.zen/tmp/coucou/${PORT}.myHOST.http | nc -l -p 1234 -q 1 && rm $HOME/.zen/tmp/coucou/${PORT}.myHOST.http) ## # WAIT FOR 1234 PORT CONTACT URL=$(echo "$REQ" | grep '^GET' | cut -d ' ' -f2 | cut -d '?' -f2) HOSTP=$(echo "$REQ" | grep '^Host:' | cut -d ' ' -f2 | cut -d '?' -f2) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 7f47896c..b0d0963a 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -155,8 +155,8 @@ if [[ ${QRCODE:0:5} == "~~~~~" ]]; then if [ $? == 0 ]; then ## TODO : MEMORIZE TX TO VERIFY ASTRO/DUNITER SYNC - COINSFILE="$HOME/.zen/tmp/coucou/${G1PUB}.COINS" - DESTFILE="$HOME/.zen/tmp/coucou/${VAL}.COINS" + COINSFILE="$HOME/.zen/tmp/${MOATS}/${G1PUB}.COINS" + DESTFILE="$HOME/.zen/tmp/${MOATS}/${VAL}.COINS" CUR=$(cat ${COINSFILE}) [[ ${CUR} != "" && ${CUR} != "null" ]] \ @@ -624,7 +624,7 @@ echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPFS" ## GET VISITOR G1 WALLET AMOUNT : VISITORCOINS echo "COINScheck : ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${QRCODE}" VISITORCOINS=$(${MY_PATH}/../tools/COINScheck.sh ${QRCODE} | tail -n 1) - COINSFILE=$HOME/.zen/tmp/coucou/${QRCODE}.COINS + COINSFILE=$HOME/.zen/tmp/${MOATS}/${QRCODE}.COINS ### PATCH COPY G1BILLET G1PUB TO MALKE PAYMENT WHEN RECONNECT cp $COINSFILE ~/live/