play more
This commit is contained in:
parent
787768aba5
commit
bff56cd062
@ -64,10 +64,14 @@ espeak "Restarting Astroport Station API" > /dev/null 2>&1
|
||||
## CLOSING API PORT
|
||||
[[ -s ~/.zen/.pid ]] && kill -9 $(cat ~/.zen/.pid)
|
||||
## KILL ALL REMAINING nc
|
||||
killall nc
|
||||
killall nc 12345.sh
|
||||
## OPEN API ENGINE
|
||||
~/.zen/Astroport.ONE/12345.sh > ~/.zen/tmp/12345.log &
|
||||
PID=$!
|
||||
echo $PID > ~/.zen/.pid
|
||||
if [[ ! -f /etc/systemd/system/astroport.service ]]; then
|
||||
~/.zen/Astroport.ONE/12345.sh > ~/.zen/tmp/12345.log &
|
||||
PID=$!
|
||||
echo $PID > ~/.zen/.pid
|
||||
else
|
||||
echo "systemd will restart..."
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
################################################################################
|
||||
################################################################################
|
||||
## API: SALT & PEPPER
|
||||
## API: PLAYER - PUBLIC KEY AUTH
|
||||
################################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
################################################################################
|
||||
################################################################################
|
||||
## API: SALT & PEPPER
|
||||
## API: QRCODE - ANY/MULTI KEY OPERATIONS
|
||||
################################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
@ -28,14 +28,19 @@ TYPE=$WHAT
|
||||
|
||||
## GET TW
|
||||
mkdir -p ~/.zen/tmp/${MOATS}/
|
||||
|
||||
################################################################################
|
||||
## REFRESH STATION & OPEN G1PalPay INTERFACE
|
||||
################################################################################
|
||||
if [[ ${QRCODE} == "station" ]]; then
|
||||
|
||||
rm ~/.zen/tmp/WSTATION ## REMOVE IN PROD
|
||||
|
||||
if [[ ! -s ~/.zen/tmp/WSTATION ]]; then
|
||||
## GENERATE PLAYER G1 TO ZEN ACCOUNTING
|
||||
ISTATION=$($MY_PATH/../tools/make_image_ipfs_index_carousel.sh | tail -n 1)
|
||||
echo $ISTATION > ~/.zen/ISTATION ## STATION G1WALLET CAROUSEL
|
||||
|
||||
## SHOW G1PALPAY FRONT
|
||||
## SHOW G1PALPAY FRONT (IFRAME)
|
||||
sed "s~_STATION_~${myIPFS}${ISTATION}/~g" $MY_PATH/../www/G1PalPay/index.html > ~/.zen/tmp/${MOATS}/index.htm
|
||||
sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/${MOATS}/index.htm
|
||||
|
||||
@ -54,8 +59,10 @@ if [[ ${QRCODE} == "station" ]]; then
|
||||
) &
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## CHECK IF QRCODE is ASTRONAUTENS or G1PUB format
|
||||
################################################################################
|
||||
## QRCODE can be ASTRONAUTENS or G1PUB format
|
||||
################################################################################
|
||||
## ACCOUNT IPNS FORMAT : CHANGE .current
|
||||
ASTROPATH=$(grep $QRCODE ~/.zen/game/players/*/.playerns | cut -d ':' -f 1 | rev | cut -d '/' -f 2- | rev 2>/dev/null)
|
||||
if [[ $ASTROPATH != "" ]]; then
|
||||
rm ~/.zen/game/players/.current
|
||||
@ -63,33 +70,35 @@ if [[ $ASTROPATH != "" ]]; then
|
||||
echo "LINKING $ASTROPATH to .current"
|
||||
#### SELECT PARRAIN "G1PalPé"
|
||||
|
||||
## SEND TO TW PAGE
|
||||
sed "s~_TWLINK_~${myIPFSGW}/ipns/${QRCODE}/#:[tag[G1Voeu]]~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "url='"${myIPFSGW}/ipns/${QRCODE}"'" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
#>>>>>>>>>>>> # SEND TO G1BILLETS
|
||||
sed "s~_TWLINK_~${myG1BILLET}?montant=0\&style=jeu~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "url='"${myG1BILLET}"?montant=0\&style=jeu'" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
(
|
||||
cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
|
||||
) &
|
||||
exit 0
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
## FILTRAGE NON G1 TO IPFS READY QRCODE
|
||||
ASTROTOIPFS=$(~/.zen/Astroport.ONE/tools/g1_to_ipfs.py ${QRCODE} 2>/dev/null)
|
||||
[[ ! ${ASTROTOIPFS} ]] \
|
||||
&& echo "INVALID QRCODE : ${QRCODE}" \
|
||||
&& (echo "$HTTPCORS ERROR - INVALID QRCODE : ${QRCODE}" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) \
|
||||
&& exit 1
|
||||
################################################################################
|
||||
|
||||
echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPFS"
|
||||
###########################################""
|
||||
###########################################
|
||||
## PROCESS QRCODE = G1PUB or IPNS
|
||||
## GET G1PUB OR CURRENT SECRET
|
||||
###########################################""
|
||||
MYPLAYERKEY=$(grep ${QRCODE} ~/.zen/game/players/*/secret.dunikey | cut -d ':' -f 1)
|
||||
[[ ! $MYPLAYERKEY ]] && MYPLAYERKEY="$HOME/.zen/game/players/.current/secret.dunikey"
|
||||
echo "$MYPLAYERKEY"
|
||||
echo "SELECTECT KEY : $MYPLAYERKEY"
|
||||
echo
|
||||
|
||||
## PARRAIN
|
||||
## PARRAIN ID EXTRACTION
|
||||
###########################################
|
||||
CURPLAYER=$(cat ~/.zen/game/players/.current/.player)
|
||||
CURG1=$(cat ~/.zen/game/players/.current/.g1pub)
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
################################################################################
|
||||
################################################################################
|
||||
## API: SALT & PEPPER
|
||||
## API: SALT & PEPPER - PRIVATE KEY AUTH
|
||||
################################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
|
@ -1,31 +0,0 @@
|
||||
<!-- homeAstroportStation function API Twist -->
|
||||
async function homeAstroportStation() {
|
||||
try {
|
||||
|
||||
let one = await fetch('/?qrcode=station'); // Gets a promise
|
||||
var doc = await one.text();
|
||||
var regex = /url='([^']+)/i; // Get response PORT
|
||||
var redirectURL = doc.match(regex)[1]
|
||||
|
||||
console.log(redirectURL)
|
||||
document.getElementById("ainfo").innerHTML = "Teleportation ... (3s) " + redirectURL;
|
||||
|
||||
setTimeout(function() {
|
||||
// let two = await fetch(redirectURL);
|
||||
// document.mydiv.innerHTML = await two.text(); // Replaces body with response
|
||||
window.location.href = redirectURL
|
||||
// window.open( redirectURL, "AstroTab");
|
||||
}, 3000);
|
||||
|
||||
} catch (err) {
|
||||
console.log('Fetch error:' + err); // Error handling
|
||||
}
|
||||
}
|
||||
|
||||
function promptUser(g1pub) {
|
||||
let salt = prompt("Identifiant");
|
||||
let pepper = prompt("Code Secret");
|
||||
let resultText = `/?salt=${salt}&pepper=${pepper}&star=1&friend=${g1pub}`;
|
||||
console.log(resultText)
|
||||
document.getElementById("debug").innerHTML = resultText;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>[Astroport] :: Station _HOSTNAME_ :: _IPFSNODEID_ </title>
|
||||
<meta http-equiv="refresh" content="60; url='http://127.0.0.1:12345'" />
|
||||
<meta http-equiv="refresh" content="121; url='http://127.0.0.1:12345'" />
|
||||
<link rel="icon" type="image/png" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/logo.png" />
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type="text/css" />
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type="text/css" />
|
||||
@ -41,21 +41,18 @@ header {
|
||||
<!-- Typed text animation -->
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmYyJmAT3cUbjk4vVWQG7LdpY3HkFH9phFD1VzzetHrgpa"></script>
|
||||
<!-- Astro API JS LIB -->
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmVZ25vNYfg2PxgFi36rNDaTiDKFuJgVTD1XmPtbWFg1hj/astro.js"></script>
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmWYaEHWrvLXUZHebJVHyBLEAJaicyfbRX37Arx5jf6sNs/astro.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h6>
|
||||
<p id="station">
|
||||
♥<span>BOX</span>
|
||||
</p>
|
||||
<p id="ainfo"></p>
|
||||
<script>
|
||||
document.getElementById("station").addEventListener("click", homeAstroportStation);
|
||||
// promptUser();
|
||||
</script>
|
||||
|
||||
<p id="station"> ♥<span>BOX</span></p>
|
||||
<div>
|
||||
<button onclick="homeAstroportStation('/?qrcode=station', '', 5111)">Open Station</button>
|
||||
</div>
|
||||
<div id="ainfo"></div>
|
||||
<div id='countdown'></div>
|
||||
</h6>
|
||||
</header>
|
||||
|
||||
@ -75,8 +72,8 @@ header {
|
||||
<h2>
|
||||
<div id="typed-strings">
|
||||
<p><span>/ <strong><em><a href="https://opencollective.com/monnaie-libre/projects/coeurbox" target="funding">LA ♥BOX</a></em></strong> /</span>^3223</p>
|
||||
<p>Off <em>CLOUD</em> ⛅</span> On IPFS ⌘^3222</p>
|
||||
<p>Safe In <strong><em><u>👉<a href="https://qwantic.com">Le Claude</a>👈</u></em></strong>^3112</p>
|
||||
<p>⌘ Interplanetary Off <em>CLOUD</em> ⛅</span> ^3222</p>
|
||||
<p>Welcome In <strong><em><u>👉<a href="https://qwantic.com">Le Claude</a>👈</u></em></strong>^3112</p>
|
||||
<p>🔥.^999.^888.^777.^666.^555.^444.3^333.2^222.1^111 🚀^4321</p>
|
||||
</div>
|
||||
<span id="typed"></span>
|
||||
@ -84,12 +81,14 @@ header {
|
||||
<span><a target="youtube" href="https://youtube.com">📺 (👍)</a> : </span><input name=g1pub value='https://www.youtube.com/playlist?list=LL'></br>
|
||||
<span>Email : </span><input name=email value=''></br></br>
|
||||
<input type='submit' value='[(♥‿‿♥)]'>
|
||||
<p>Renseignez votre lien Youtube préféré et votre Email<br>Validez</p>
|
||||
|
||||
</form>
|
||||
|
||||
</h2>
|
||||
</br>
|
||||
<p>
|
||||
<b><a href="mailto:support@qo-op.com">Besoin d'aide ?</a> Contactez support@qo-op.com</b>
|
||||
<b>support@qo-op.com</b>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
@ -196,5 +195,21 @@ function testLatency(cb) {
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
var timeLeft = 23;
|
||||
var elem = document.getElementById("countdown");
|
||||
var timerId = setInterval(countdown, 999);
|
||||
|
||||
function countdown() {
|
||||
if (timeLeft == -1) {
|
||||
clearTimeout(timerId);
|
||||
document.getElementById("countdown").innerHTML = "Remplacez les '0' par les identifiants de votre G1BILLET. Validez";
|
||||
} else {
|
||||
// elem.innerHTML = timeLeft + " s";
|
||||
timeLeft--;
|
||||
}
|
||||
}
|
||||
// promptUser();
|
||||
</script>
|
||||
</html>
|
||||
|
@ -23,11 +23,18 @@ if [[ ! -d $img_dir ]]; then
|
||||
COINS=$(${MY_PATH}/timeout.sh -t 20 $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey balance | cut -d '.' -f 1)
|
||||
echo "+++ ${PLAYER} have $COINS Ğ1 Coins +++"
|
||||
|
||||
## USE G1BARRE SERVICE AS 1ST IMAGE
|
||||
curl -so ~/.zen/tmp/carousel/${pub}.png \
|
||||
"https://g1sms.fr/g1barre/image.php?pubkey=${pub}&target=20000&title=${PLAYER}&node=g1.asycn.io&start_date=2020-01-01&display_pubkey=true&display_qrcode=true"
|
||||
echo "GOT ~/.zen/tmp/carousel/${pub}.png"
|
||||
|
||||
## WRITE ON IT : ASK FOR REFILL
|
||||
|
||||
## PREPARE LOOP LINK LINE
|
||||
ASTRONAUTENS=$(cat ~/.zen/game/players/${PLAYER}/.playerns)
|
||||
echo "<a target=\"$PLAYER\" href=\"$myASTROPORT/?qrcode=$ASTRONAUTENS\" title=\"$PLAYER ($COINS G1)\">_REPLACE_</a>" > ~/.zen/tmp/carousel/${pub}.insert
|
||||
[[ $COINS -gt 0 ]] \
|
||||
&& echo "<a href=\"$myASTROPORT/?qrcode=$ASTRONAUTENS\" title=\"$PLAYER ($COINS G1)\">_REPLACE_</a>" > ~/.zen/tmp/carousel/${pub}.insert \
|
||||
|| echo "_REPLACE_" > ~/.zen/tmp/carousel/${pub}.insert
|
||||
|
||||
done
|
||||
img_dir="$HOME/.zen/tmp/carousel"
|
||||
@ -59,6 +66,8 @@ echo "<link rel=\"stylesheet\" href=\"/ipfs/QmX9QyopkTw9TdeC6yZpFzutfjNFWP36nzfP
|
||||
}
|
||||
</style>
|
||||
|
||||
<h2> $myHOST ACCOUNTS $(date) </h2>
|
||||
|
||||
<div class=\"container\">
|
||||
|
||||
<div id=\"myCarousel\" class=\"carousel slide\" data-ride=\"carousel\">
|
||||
@ -124,7 +133,6 @@ echo " </div>
|
||||
<span class=\"carousel-control-next-icon\"></span>
|
||||
</a>
|
||||
</div>
|
||||
<h2> Astroport $myHOST ZEN Gallery $(date) </h2>
|
||||
</div>
|
||||
|
||||
<script src=\"/ipfs/QmX9QyopkTw9TdeC6yZpFzutfjNFWP36nzfPQTULc4cYVJ/jquery-3.2.1.slim.min.js\"></script>
|
||||
|
@ -387,6 +387,7 @@ myAPI="http://$(myIp):5001"
|
||||
myDATA="https://data.gchange.fr"
|
||||
myGCHANGE="https://www.gchange.fr"
|
||||
myCESIUM="https://g1.data.e-is.pro"
|
||||
myG1BILLET="http://g1billet.localhost:33101"
|
||||
myHOST="$(myHostName)"
|
||||
myIP="$(myIp)"
|
||||
myIPFS="http://ipfs.localhost:8080"
|
||||
@ -400,4 +401,5 @@ myASTROTUBE="https://$(myAstroTube)"
|
||||
&& myAPI="https://ipfs.$(myHostName)" \
|
||||
&& myIPFS="https://ipfs.$(myDomainName)" \
|
||||
&& myHOST="astroport.$(myHostName)" \
|
||||
&& myG1BILLET="https://g1billet.$(myHostName)" \
|
||||
|| true
|
||||
|
@ -2,11 +2,14 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<link rel="icon" type="image/x-icon" href="http://127.0.0.1:8080/ipfs/QmNwECbSL6xihpS2QLpts8a8Boekk3rEVGeySuzg83jTDA/favicon.ico">
|
||||
<link rel="icon" type="image/x-icon" href="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/favicon.ico">
|
||||
<title>Compte Ğ1 dans le Claude Inter Planetaire - Astroport Ŋ1 - </title>
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmVuJCKVp57b3HzwDRAoURonaFwWTwvoqq2Am2JoSQhdPz/index_fichiers/demo.css">
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmXd2PdXAB52ErzzBj41UjUrEnLNuM39VHTZoA7YwYdcwa/jquery-3.6.3.min.js"></script>
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmXd2PdXAB52ErzzBj41UjUrEnLNuM39VHTZoA7YwYdcwa/instascan.min.js"></script>
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/demo.css">
|
||||
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmWYaEHWrvLXUZHebJVHyBLEAJaicyfbRX37Arx5jf6sNs/astro.js"></script>
|
||||
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/jquery-3.6.3.min.js"></script>
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/instascan.min.js"></script>
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type="text/css" />
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type="text/css" />
|
||||
<style>
|
||||
@ -98,10 +101,8 @@ a {
|
||||
<div id="demo">
|
||||
<div id="description">
|
||||
<h1>Ğ1 Invasion</h1>
|
||||
<h2>Pourquoi attendre sa Retraite ?</h2>
|
||||
<h2>Oubliez la crise... </h2>
|
||||
|
||||
<h2>Utilisez la Monnaie Libre !</a></h2>
|
||||
<h2>Pourquoi attendre sa Retraite ? Oubliez la crise... </h2>
|
||||
<h2>Société Interplanétaire by La <a href="https://opencollective.com/monnaie-libre/projects/stiits">STI</a> </h2>
|
||||
|
||||
|
||||
</div>
|
||||
@ -177,8 +178,8 @@ a {
|
||||
|
||||
</script>
|
||||
|
||||
<div id="yellow" >Choisissez un Parrain
|
||||
<iframe id="inframe" src="_STATION_" width="100%" height="250px"></iframe>
|
||||
<div id="yellow" >Menu
|
||||
<iframe id="inframe" src="_STATION_" width="100%" height="360px"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user