coucou only for COINS and not served PORT
This commit is contained in:
parent
699e51a576
commit
9aadaa4e55
14
12345.sh
14
12345.sh
|
@ -88,24 +88,24 @@ while true; do
|
||||||
|
|
||||||
############### ############### ############### ############### templates/index.http
|
############### ############### ############### ############### templates/index.http
|
||||||
# REPLACE myHOST in http response template (fixing next API meeting point)
|
# REPLACE myHOST in http response template (fixing next API meeting point)
|
||||||
echo "$HTTPCORS" > ~/.zen/tmp/coucou/${MOATS}.myHOST.http
|
echo "$HTTPCORS" > ~/.zen/tmp/coucou/${PORT}.myHOST.http
|
||||||
myHtml >> ~/.zen/tmp/coucou/${MOATS}.myHOST.http
|
myHtml >> ~/.zen/tmp/coucou/${PORT}.myHOST.http
|
||||||
|
|
||||||
## REPLACE RESPONSE PORT
|
## REPLACE RESPONSE PORT
|
||||||
sed -i -e "s~http://127.0.0.1:12345~http://${myIP}:${PORT}~g" \
|
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}
|
## WAN REDIRECT TO HTTPS:// + /${PORT}
|
||||||
[ -z "$isLAN" ] \
|
[ -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
|
## 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)
|
URL=$(echo "$REQ" | grep '^GET' | cut -d ' ' -f2 | cut -d '?' -f2)
|
||||||
HOSTP=$(echo "$REQ" | grep '^Host:' | cut -d ' ' -f2 | cut -d '?' -f2)
|
HOSTP=$(echo "$REQ" | grep '^Host:' | cut -d ' ' -f2 | cut -d '?' -f2)
|
||||||
|
|
|
@ -155,8 +155,8 @@ if [[ ${QRCODE:0:5} == "~~~~~" ]]; then
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
|
|
||||||
## TODO : MEMORIZE TX TO VERIFY ASTRO/DUNITER SYNC
|
## TODO : MEMORIZE TX TO VERIFY ASTRO/DUNITER SYNC
|
||||||
COINSFILE="$HOME/.zen/tmp/coucou/${G1PUB}.COINS"
|
COINSFILE="$HOME/.zen/tmp/${MOATS}/${G1PUB}.COINS"
|
||||||
DESTFILE="$HOME/.zen/tmp/coucou/${VAL}.COINS"
|
DESTFILE="$HOME/.zen/tmp/${MOATS}/${VAL}.COINS"
|
||||||
|
|
||||||
CUR=$(cat ${COINSFILE})
|
CUR=$(cat ${COINSFILE})
|
||||||
[[ ${CUR} != "" && ${CUR} != "null" ]] \
|
[[ ${CUR} != "" && ${CUR} != "null" ]] \
|
||||||
|
@ -624,7 +624,7 @@ echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPFS"
|
||||||
## GET VISITOR G1 WALLET AMOUNT : VISITORCOINS
|
## GET VISITOR G1 WALLET AMOUNT : VISITORCOINS
|
||||||
echo "COINScheck : ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${QRCODE}"
|
echo "COINScheck : ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${QRCODE}"
|
||||||
VISITORCOINS=$(${MY_PATH}/../tools/COINScheck.sh ${QRCODE} | tail -n 1)
|
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
|
### PATCH COPY G1BILLET G1PUB TO MALKE PAYMENT WHEN RECONNECT
|
||||||
cp $COINSFILE ~/live/
|
cp $COINSFILE ~/live/
|
||||||
|
|
Loading…
Reference in New Issue