make && make install

This commit is contained in:
fred 2023-11-23 19:38:50 +01:00
parent 2f0725affe
commit 72f450da0d
6 changed files with 61 additions and 48 deletions

View File

@ -114,7 +114,7 @@ EMAIL="${PLAYER,,}" # lowercase
### SESSION "$LAT" "$LON" KEY ### SESSION "$LAT" "$LON" KEY
${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/_ipns.priv "$LAT" "$LON" ${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/_ipns.priv "$LAT" "$LON"
UMAPNS=$(ipfs key import ${MOATS} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/_ipns.priv) UMAPNS=$(ipfs key import ${MOATS} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/_ipns.priv)
ipfs key rm ${MOATS} && echo "IPNS key identified" ipfs key rm ${MOATS} && echo "$LAT" "$LON" "IPNS key identified"
### ###
REDIR="${myIPFS}/ipns/${UMAPNS}" REDIR="${myIPFS}/ipns/${UMAPNS}"
@ -125,10 +125,12 @@ if [[ "${EMAIL}" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then
echo "VALID ${EMAIL} EMAIL OK" echo "VALID ${EMAIL} EMAIL OK"
## CHECK if TW is HERE ## CHECK if PLAYER exists in SWARM
[[ -s ~/.zen/tmp/${MOATS}/TW/${EMAIL}/index.html ]] \ $($MY_PATH/../tools/search_for_this_email_in_players.sh ${EMAIL}) ## export ASTROTW and more
&& (echo "$HTTPCORS <meta http-equiv=\"refresh\" content=\"0; url='${REDIR}/TW/${EMAIL}/index.html'\" /> '" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) \ echo "export ASTROPORT=${ASTROPORT} ASTROTW=${ASTROTW} ASTROG1=${ASTROG1} ASTROMAIL=${EMAIL} ASTROFEED=${FEEDNS}"
&& echo "TW is HERE : $EMAIL" && exit 0 [[ ${ASTROTW} ]] \
&& (echo "$HTTPCORS <meta http-equiv=\"refresh\" content=\"0; url='/ipns/${ASTROTW}'\" />" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) \
&& exit 0
else else
@ -161,32 +163,25 @@ UMAPNS=$(ipfs key import ${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/_ip
[[ ! ${UMAPNS} ]] && (echo "$HTTPCORS ERROR - (╥☁╥ ) - UMAPNS COMPUTATION DISFUNCTON" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1 [[ ! ${UMAPNS} ]] && (echo "$HTTPCORS ERROR - (╥☁╥ ) - UMAPNS COMPUTATION DISFUNCTON" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1
echo "UMAPNS : ${myIPFS}/ipns/${UMAPNS}" echo "UMAPNS : ${myIPFS}/ipns/${UMAPNS}"
### CREATE A ZENCARD FOR PLAYER (NO TW EXISTS YET for EMAIL) ## ALL TEST PASSED -> CREATE ZENCARD + ASTROID
if [[ ! -f ~/.zen/tmp/${MOATS}/TW/${EMAIL}/index.html ]]; then NPASS=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-9) ## NOUVEAU PASS 8 CHIFFRES
## CHECK IF TW EXISTS FOR THIS EMAIL ALREADY ## CREATE ASTRONAUTE TW ON CURRENT ASTROPORT
$($MY_PATH/../tools/search_for_this_email_in_players.sh ${EMAIL}) ## export ASTROTW and more (
echo "export ASTROPORT=${ASTROPORT} ASTROTW=${ASTROTW} ASTROG1=${ASTROG1} ASTROMAIL=${EMAIL} ASTROFEED=${FEEDNS}" echo VISA.new.sh "${EMAIL}" "${NPASS}" "${EMAIL}" "UPlanet" "/ipns/${UMAPNS}" "${LAT}" "${LON}"
[[ ${ASTROTW} ]] && (echo "$HTTPCORS <meta http-equiv=\"refresh\" content=\"0; url='/ipns/${ASTROTW}'\" />" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1 ##### (☉_☉ ) #######
${MY_PATH}/../RUNTIME/VISA.new.sh "${EMAIL}" "${NPASS}" "${EMAIL}" "UPlanet" "/ipns/${UMAPNS}" "${LAT}" "${LON}" >> ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt
NPASS=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-9) ## NOUVEAU PASS 8 CHIFFRES # ${MY_PATH}/../tools/mailjet.sh "${EMAIL}" ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt ## Send VISA.new log to EMAIL
## CREATE ASTRONAUTE TW ON CURRENT ASTROPORT ## TO REMOVE : MONITOR
( ${MY_PATH}/../tools/mailjet.sh "support@g1sms.fr" ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt ## Send VISA.new log to EMAIL
echo VISA.new.sh "${EMAIL}" "${NPASS}" "${EMAIL}" "UPlanet" "/ipns/${UMAPNS}" "${LAT}" "${LON}"
##### (☉_☉ ) #######
${MY_PATH}/../RUNTIME/VISA.new.sh "${EMAIL}" "${NPASS}" "${EMAIL}" "UPlanet" "/ipns/${UMAPNS}" "${LAT}" "${LON}" >> ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt
${MY_PATH}/../tools/mailjet.sh "${EMAIL}" ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt ## Send VISA.new log to EMAIL
## TO REMOVE : MONITOR
${MY_PATH}/../tools/mailjet.sh "support@g1sms.fr" ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt ## Send VISA.new log to EMAIL
end=`date +%s` end=`date +%s`
echo "(TW REGISTRATION) Operation time was "`expr $end - $start` seconds. echo "(TW REGISTRATION) Operation time was "`expr $end - $start` seconds.
) & ) &
fi
######################################## ########################################
################################################################################ ################################################################################

View File

@ -54,19 +54,27 @@ There is 2 methods one for server and one for Linux Mint desktop
## SERVER : Using DOCKER (and MyOS) ## SERVER : Using DOCKER (and MyOS)
Server & printer only, the easiest way to automaticaly deploy Astroport.ONE services the easiest way to automaticaly deploy and host Astroport.ONE services
``` ```
sudo apt install docker-compose make # install minimal requirements
sudo apt install git docker make
# clone Astroport.ONE repo
git clone https://github.com/papiche/Astroport.ONE.git
cd Astroport.ONE
make
make install make install
``` ```
If your computer is running 24/24, you can join our "Boostrap list" & officially become a [TW UPlanet hoster](https://talk.tiddlywiki.org/t/uplanet-a-planet-full-of-tws/8193?u=papiche)
> PLEASE REPORT ANY ISSUES > PLEASE REPORT ANY ISSUES
## DESKTOP : Using install.sh script ## DESKTOP : Using install.sh script
With desktop. Best for "Linux Mint" (or Debian compatible) Tested on "Linux Mint" (Debian like distro compatible), the **hacker way for using & buidling new blockchain services** ...
``` ```
# install on system wide # install on system wide
@ -83,7 +91,7 @@ bash <(wget -qO- https://raw.githubusercontent.com/papiche/Astroport.ONE/master/
Si tout s'est bien déroulé, vous devriez trouver ces processus en cours d'execution... Si tout s'est bien déroulé, vous devriez trouver ces processus en cours d'execution...
``` ```
/usr/local/bin/ipfs daemon --enable-pubsub-experiment --enable-namesy /usr/local/bin/ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub
/bin/bash /home/fred/.zen/G1BILLET/G1BILLETS.sh daemon /bin/bash /home/fred/.zen/G1BILLET/G1BILLETS.sh daemon
\_ /bin/bash /home/fred/.zen/G1BILLET/G1BILLETS.sh daemon \_ /bin/bash /home/fred/.zen/G1BILLET/G1BILLETS.sh daemon
\_ nc -l -p 33101 -q 1 \_ nc -l -p 33101 -q 1
@ -97,7 +105,7 @@ Si tout s'est bien déroulé, vous devriez trouver ces processus en cours d'exec
# LANCEMENT # LANCEMENT
Après l'installation, vous devriez avoir 2 nouveaux raccourcis sur votre "Bureau" Après l'installation, vous devriez avoir 3 nouveaux raccourcis sur votre "Bureau"
* "Astroport" qui ouvre le portail de votre Station : http://astroport.localhost:1234 * "Astroport" qui ouvre le portail de votre Station : http://astroport.localhost:1234
* "REC" qui permet d'enregistrer vos fichiers sur IPFS et publier leur Capusle dans votre TW * "REC" qui permet d'enregistrer vos fichiers sur IPFS et publier leur Capusle dans votre TW
@ -114,7 +122,8 @@ Permet la Gestion des PLAYER (et des G1VoeuX) en mode CLI
## http://astroport.localhost:1234 ## http://astroport.localhost:1234
Une fois votre Station Astroport démarrée: Une fois votre Station Astroport démarrée:
* le port 1234 publie API (REPONSE PORT TCP 12245 à 12445 ) * le port 1234 publie API (REPONSE PORT TCP 45780 45781 ( jusqu'à ... 45790 )
* le port 12345 publie MAP(*) (CARTE DE L'ESSAIM - BOOTSTRAP / STATIONS) * le port 12345 publie MAP(*) (CARTE DE L'ESSAIM - BOOTSTRAP / STATIONS)
* le port 33101 publie G1BILLETS (REPONSE PORT TCP 33102) * le port 33101 publie G1BILLETS (REPONSE PORT TCP 33102)

View File

@ -31,9 +31,9 @@ LIBRA=$(head -n 2 ${MY_PATH}/../A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f
################################################################################ ################################################################################
## LIST TW MODELS ## LIST TW MODELS
################################################################################ ################################################################################
TWMODEL="/ipfs/bafybeiaaf52awrqliwn5mqleua6tcv4qv5oxjfa6j2web6nh42vzdtjkiu" TWMODEL="/ipfs/QmPr5SpFiaTVyjJuBmhyckwSCP1gHbhJbZFjC5YyxNHmJa"
# ipfs cat $TWMODEL > templates/twdefault.html # ipfs cat $TWMODEL > templates/twdefault.html
MINIMAL="/ipfs/bafybeiem3kmasvaeljmrfyiwjy4x2lhp7meo2qv22w5rbl4ijf5jl6a7lm" MINIMAL="/ipfs/bafybeiepnfnej3e3dwsotcs36b3whwigxng2dyejzfffpducs3axlgau4i"
# ipfs cat $MINIMAL > templates/minimal.html # ipfs cat $MINIMAL > templates/minimal.html
################################################################################ ################################################################################
@ -192,13 +192,13 @@ DISCO="/?salt=${USALT}&pepper=${UPEPPER}"
TWNS=$(ipfs key import ${PLAYER} -f pem-pkcs8-cleartext ~/.zen/game/players/${PLAYER}/secret.player) TWNS=$(ipfs key import ${PLAYER} -f pem-pkcs8-cleartext ~/.zen/game/players/${PLAYER}/secret.player)
ASTRONAUTENS=$(ipfs key import $G1PUB -f pem-pkcs8-cleartext ~/.zen/game/players/${PLAYER}/secret.player) ASTRONAUTENS=$(ipfs key import $G1PUB -f pem-pkcs8-cleartext ~/.zen/game/players/${PLAYER}/secret.player)
mkdir -p ~/.zen/game/players/${PLAYER}/ipfs/G1SSB # Prepare astrXbian sub-datastructure mkdir -p ~/.zen/game/players/${PLAYER}/ipfs/G1SSB # Prepare astrXbian sub-datastructure "DEPRECATED"
qrencode -s 12 -o ~/.zen/game/players/${PLAYER}/QR.png "$G1PUB" qrencode -s 12 -o ~/.zen/game/players/${PLAYER}/QR.png "$G1PUB"
cp ~/.zen/game/players/${PLAYER}/QR.png ~/.zen/game/players/${PLAYER}/ipfs/QR.png cp ~/.zen/game/players/${PLAYER}/QR.png ~/.zen/game/players/${PLAYER}/ipfs/QR.png
echo "$G1PUB" > ~/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.pubkey # G1SSB NOTATION (astrXbian compatible) echo "$G1PUB" > ~/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.pubkey # G1SSB NOTATION (astrXbian compatible)
qrencode -s 12 -o ~/.zen/game/players/${PLAYER}/QR.ASTRONAUTENS.png "$LIBRA/ipns/${ASTRONAUTENS}" qrencode -s 12 -o ~/.zen/game/players/${PLAYER}/QR.ASTRONAUTENS.png "$myLIBRA/ipns/${ASTRONAUTENS}"
############################################################################ ############################################################################
## SEC PASS PROTECTED QRCODE : base58 secret.june / openssl(pass) ## SEC PASS PROTECTED QRCODE : base58 secret.june / openssl(pass)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ cat "${RSS}" | jq -r '.[] | .title' > ~/.zen/tmp/${MOATS}/titles.list
while read title; do while read title; do
[[ ${title} == "GettingStarted" || ${title} == "GPS" || ${title} == "AstroID" || ${title} == "Astroport" || ${title} == "MadeInZion" || ${title} == "G1Visa" || ${title} == "ZenCard" || ${title::5} == "Draft" ]] \ [[ ${title} == "GettingStarted" || ${title} == "GPS" || ${title} == "AstroID" || ${title} == "Astroport" || ${title} == "MadeInZion" || ${title} == "ZenCard" || ${title} == "ZenCard" || ${title::5} == "Draft" ]] \
&& echo "FILTERED TITLE ${title}" && continue && echo "FILTERED TITLE ${title}" && continue
## CHECK FOR TIDDLER WITH SAME TITTLE IN SECTOR TW ## CHECK FOR TIDDLER WITH SAME TITTLE IN SECTOR TW