Activate access to SaltPepper G1Card login, TODO arrange better 20H12 sun time multi node (a)sync
This commit is contained in:
parent
ddc5a7dee4
commit
209c9515c9
17
12345.sh
17
12345.sh
|
@ -132,13 +132,16 @@ while true; do
|
|||
## / CONTACT
|
||||
if [[ $URL == "/" ]]; then
|
||||
echo "/ CONTACT : $HOSTP"
|
||||
echo "$HTTPCORS
|
||||
<html>
|
||||
<head>
|
||||
<title>[Astroport] :powered: Station</title>
|
||||
<meta http-equiv=\"refresh\" content=\"3; url='https://astroport.com'\" />
|
||||
</head>
|
||||
DING : ${MOATS} : $(date)" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
||||
|
||||
mySalt | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
||||
|
||||
#~ echo "$HTTPCORS
|
||||
#~ <html>
|
||||
#~ <head>
|
||||
#~ <title>[Astroport] :powered: Station</title>
|
||||
#~ <meta http-equiv=\"refresh\" content=\"3; url='https://astroport.com'\" />
|
||||
#~ </head>
|
||||
#~ DING : ${MOATS} : $(date)" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
||||
end=`date +%s`
|
||||
echo " (‿/‿) $myHOST:$PORT / Execution time was "`expr $end - $start` seconds.
|
||||
continue
|
||||
|
|
|
@ -48,6 +48,15 @@ espeak "Players refresh" > /dev/null 2>&1
|
|||
# Refresh ~/.zen/game/players/PLAYER
|
||||
~/.zen/Astroport.ONE/RUNTIME/PLAYER.refresh.sh
|
||||
|
||||
espeak "REFRESHING SWARM" > /dev/null 2>&1
|
||||
# Refresh ~/.zen/game/players/PLAYER
|
||||
~/.zen/Astroport.ONE/RUNTIME/MAP.refresh.sh
|
||||
|
||||
espeak "REFRESHING UPLANET" > /dev/null 2>&1
|
||||
# Refresh ~/.zen/game/players/PLAYER
|
||||
~/.zen/Astroport.ONE/RUNTIME/UPLANET.refresh.sh
|
||||
|
||||
|
||||
## if [[ ! $isLAN ]]; then
|
||||
## REFRESH BOOTSTRAP LIST (OFFICIAL SWARM)
|
||||
espeak "bootstrap refresh" > /dev/null 2>&1
|
||||
|
@ -68,7 +77,7 @@ echo "20H12 (♥‿‿♥) Execution time was $dur" seconds.
|
|||
# ~/.zen/Astroport.ONE/tools/ipfs_P2P_forward.sh ## COULD FORWARD LOCAL TCP PORT TO SWARM
|
||||
rm ~/.zen/game/players/localhost/latest
|
||||
|
||||
## MAIL LOG : support@qo-op.com
|
||||
## MAIL LOG : support@qo-op.com ##
|
||||
$MY_PATH/tools/mailjet.sh "support@g1sms.fr" "/tmp/20h12.log"
|
||||
|
||||
espeak "duration was $dur seconds" > /dev/null 2>&1
|
||||
|
|
|
@ -501,3 +501,5 @@ Did you ever dring a beer bought in G1 ?
|
|||
You can pay me a beer or more by contributing to our OpenCollective
|
||||
https://opencollective.com/monnaie-libre#category-ABOUT
|
||||
|
||||
## IPFS Ecosystem Directory Submission Form
|
||||
https://airtable.com/appLWiIrg9SQaEtEq/shrjwvk9pAeAk0Ci7
|
||||
|
|
|
@ -281,10 +281,4 @@ for PLAYER in ${PLAYERONE[@]}; do
|
|||
done
|
||||
echo "PLAYER.refresh DONE."
|
||||
|
||||
echo "REFRESHING MAP"
|
||||
${MY_PATH}/MAP.refresh.sh
|
||||
|
||||
echo "REFRESHING UPLANET"
|
||||
${MY_PATH}/UPLANET.refresh.sh
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -3,8 +3,8 @@ DUNIKEY=/.zen/game/players/.current/secret.dunikey
|
|||
|
||||
# Noeud Duniter
|
||||
#NODE=https://g1.asycn.io/gva
|
||||
NODE=https://duniter.pini.fr/gva
|
||||
#NODE=https://g1.brussels.ovh/gva
|
||||
#NODE=https://duniter.pini.fr/gva
|
||||
NODE=https://g1.copylaradio.com/gva
|
||||
# https://ginspecte.mithril.re/service_types/1
|
||||
# ??? NODE=https://g1.geragc.es/gva
|
||||
# ??? NODE=https:g1.cuates.net/gva
|
||||
|
|
20
tools/my.sh
20
tools/my.sh
|
@ -374,6 +374,26 @@ myHtml() {
|
|||
[ -n "$myHtml" ] && echo "$myHtml"
|
||||
}
|
||||
|
||||
mySalt() {
|
||||
local mySalt=$($RUN sed \
|
||||
-e "s~http://127.0.0.1:8080~${myIPFS}~g" \
|
||||
-e "s~\"http://127.0.0.1:1234\"~\"${myASTROPORT}\"~g" \
|
||||
-e "s~http://127.0.0.1:33101~http://${myHOST}:33101~g" \
|
||||
-e "s~https://ipfs.copylaradio.com~${myIPFSGW}~g" \
|
||||
-e "s~http://g1billet.localhost:33101~${myG1BILLET}~g" \
|
||||
-e "s~_IPFSNODEID_~${IPFSNODEID}~g" \
|
||||
-e "s~g1billet.localhost~${myIP}~g" \
|
||||
-e "s~_HOSTNAME_~$(hostname)~g" \
|
||||
-e "s~background.000.~background.$(printf '%03d' "$(seq 0 17 |shuf -n 1)").~g" \
|
||||
~/.zen/Astroport.ONE/templates/saltpepper.http)
|
||||
[ -z "$isLAN" ] \
|
||||
|| mySalt=$($RUN echo "$mySalt" | sed \
|
||||
-e "s~<input type='"'hidden'"' name='"'salt'"' value='"'0'"'>~<input name='"'salt'"' value='"''"'>~g" \
|
||||
-e "s~<input type='"'hidden'"' name='"'pepper'"' value='"'0'"'>~<input name='"'pepper'"' value='"''"'>~g")
|
||||
[ -n "$mySalt" ] && echo "$mySalt"
|
||||
}
|
||||
|
||||
|
||||
myTs() {
|
||||
local myTs=$(date +%s)
|
||||
[ -n "$myTs" ] && echo "$myTs"
|
||||
|
|
|
@ -26,19 +26,27 @@ if [[ "${EMAIL}" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then
|
|||
## TODO ? SEARCH WITH DNSLINK
|
||||
echo "export TW=${INDEX}"
|
||||
|
||||
## EXTRACT DATA FROM TW
|
||||
mkdir -p ~/.zen/tmp/${MOATS}
|
||||
rm -f ~/.zen/tmp/${MOATS}/Astroport.json
|
||||
# SWARM CACHE index.html contains
|
||||
# <meta http-equiv="refresh" content="0; url='/ipns/$EXTERNAL'" />
|
||||
EXTERNAL=$(grep -o "url='/[^']*'" ${INDEX} | sed "s/url='\(.*\)'/\1/" | awk -F"/" '{print $3}')
|
||||
|
||||
tiddlywiki --load ${INDEX} --output ~/.zen/tmp/${MOATS} --render '.' 'Astroport.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'Astroport'
|
||||
if [[ ! ${EXTERNAL} ]]; then
|
||||
## EXTRACT DATA FROM TW
|
||||
mkdir -p ~/.zen/tmp/${MOATS}
|
||||
rm -f ~/.zen/tmp/${MOATS}/Astroport.json
|
||||
|
||||
ASTROPORT=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].astroport)
|
||||
ASTROG1=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].g1pub)
|
||||
tiddlywiki --load ${INDEX} --output ~/.zen/tmp/${MOATS} --render '.' 'Astroport.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'Astroport'
|
||||
|
||||
## GET ASTRONAUTENS - field was missing in TW model Astroport Tiddler -
|
||||
ASTRONAUTENS=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].astronautens)
|
||||
[[ ${ASTRONAUTENS} == "null" || ${ASTRONAUTENS} == "" ]] && ASTRONAUTENS="/ipns/"$(ipfs key list -l | grep -w ${ASTROG1} | cut -d ' ' -f1)
|
||||
[[ ${ASTRONAUTENS} == "/ipns/" ]] && ASTRONAUTENS=""
|
||||
ASTROPORT=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].astroport)
|
||||
ASTROG1=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].g1pub)
|
||||
|
||||
## GET ASTRONAUTENS - field was missing in TW model Astroport Tiddler -
|
||||
ASTRONAUTENS=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].astronautens)
|
||||
[[ ${ASTRONAUTENS} == "null" || ${ASTRONAUTENS} == "" ]] && ASTRONAUTENS="/ipns/"$(ipfs key list -l | grep -w ${ASTROG1} | cut -d ' ' -f1)
|
||||
[[ ${ASTRONAUTENS} == "/ipns/" ]] && ASTRONAUTENS=""
|
||||
else
|
||||
ASTRONAUTENS="/ipns/${EXTERNAL}"
|
||||
fi
|
||||
|
||||
rm -Rf ~/.zen/tmp/${MOATS}
|
||||
# cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r
|
||||
|
|
Loading…
Reference in New Issue