This commit is contained in:
parent
0d73983977
commit
46ac37917a
4
start.sh
4
start.sh
|
@ -151,8 +151,8 @@ select fav in "${choices[@]}"; do
|
||||||
done
|
done
|
||||||
echo "REMOVE GCHANGE PROFILE"
|
echo "REMOVE GCHANGE PROFILE"
|
||||||
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n https://data.gchange.fr erase
|
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n https://data.gchange.fr erase
|
||||||
echo "REMOVE CESIUM+"
|
#~ echo "REMOVE CESIUM+"
|
||||||
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n https://g1.data.e-is.pro erase
|
#~ $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n https://g1.data.e-is.pro erase
|
||||||
echo "rm -Rf ~/.zen/game/players/$PLAYER"
|
echo "rm -Rf ~/.zen/game/players/$PLAYER"
|
||||||
rm -Rf ~/.zen/game/players/$PLAYER
|
rm -Rf ~/.zen/game/players/$PLAYER
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
[{"title":"$:/ipfs/saver/api/http/local/5001","tags":"$:/ipfs/core $:/ipfs/saver/api","text":"http://ipfs.localhost:5001"}]
|
[{"title":"$:/ipfs/saver/api/http/local/5001","tags":"$:/ipfs/core $:/ipfs/saver/api","text":"_NID_/api"}]
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
[{"title":"$:/ipfs/saver/gateway/local/myip","tags":"$:/ipfs/core $:/ipfs/saver/gateway","text":"http://ipfs.localhost:8080"}]
|
[{"title":"$:/ipfs/saver/gateway/local/myip","tags":"$:/ipfs/core $:/ipfs/saver/gateway","text":"_NID_"}]
|
||||||
|
|
|
@ -61,19 +61,20 @@ if [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/cesium.json ]]; then
|
||||||
[[ ! $? == 0 ]] && echo "GCHANGE PROFILE CREATION FAILED"
|
[[ ! $? == 0 ]] && echo "GCHANGE PROFILE CREATION FAILED"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
## TODO : GET THE MEMBER KEY TO SEND MESSAGE THROUGH CESIUM+
|
||||||
|
|
||||||
## SET CESIUM WALLET
|
#~ ## SET CESIUM WALLET
|
||||||
########################################################################
|
#~ ########################################################################
|
||||||
echo "CESIUM+ https://demo.cesium.app/#/app/wot/lg?q=$G1PUB"
|
#~ echo "CESIUM+ https://demo.cesium.app/#/app/wot/lg?q=$G1PUB"
|
||||||
########################################################################
|
#~ ########################################################################
|
||||||
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" --s "http://ipfs.localhost:8080/ipns/$ASTRONAUTENS" #CESIUM+
|
#~ $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" --s "http://ipfs.localhost:8080/ipns/$ASTRONAUTENS" #CESIUM+
|
||||||
[[ ! $? == 0 ]] && echo "CESIUM PROFILE CREATION FAILED"
|
#~ [[ ! $? == 0 ]] && echo "CESIUM PROFILE CREATION FAILED"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## GET PROFILE BACK
|
## GET PROFILE BACK
|
||||||
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" get > ~/.zen/game/players/${PLAYER}/ipfs/gchange.json
|
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" get > ~/.zen/game/players/${PLAYER}/ipfs/gchange.json
|
||||||
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" get > ~/.zen/game/players/${PLAYER}/ipfs/cesium.json
|
#~ $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" get > ~/.zen/game/players/${PLAYER}/ipfs/cesium.json
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,14 @@ G1PUB=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
## CREATE Player personnal files storage and IPFS publish directory
|
## CREATE Player personnal files storage and IPFS publish directory
|
||||||
mkdir -p ~/.zen/game/players/$PLAYER # Prepare PLAYER datastructure
|
mkdir -p ~/.zen/game/players/$PLAYER # Prepare PLAYER datastructure
|
||||||
|
|
||||||
|
# PLAYER=geg-la_debrouille@super.chez-moi.com
|
||||||
|
YUSER=$(echo $PLAYER | cut -d '@' -f1) # YUSER=geg-la_debrouille
|
||||||
|
LYUSER=($(echo "$YUSER" | sed 's/[^a-zA-Z0-9]/\ /g')) # LYUSER=(geg la debrouille)
|
||||||
|
CLYUSER=$(printf '%s\n' "${LYUSER[@]}" | tac | tr '\n' '.' ) # CLYUSER=debrouille.la.geg.
|
||||||
|
YOMAIN=$(echo $PLAYER | cut -d '@' -f 2) # YOMAIN=super.chez-moi.com
|
||||||
|
NID="https://ipfs.$CLYUSER$YOMAIN.$HOSTNAME"
|
||||||
|
echo "$NID"
|
||||||
|
|
||||||
mv ~/.zen/tmp/${MOATS}/secret.dunikey ~/.zen/game/players/$PLAYER/
|
mv ~/.zen/tmp/${MOATS}/secret.dunikey ~/.zen/game/players/$PLAYER/
|
||||||
|
|
||||||
# Create Player "IPNS Key" (key import)
|
# Create Player "IPNS Key" (key import)
|
||||||
|
@ -221,7 +229,8 @@ G1PUB=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
sed -i "s~_MEDIAKEY_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
sed -i "s~_MEDIAKEY_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
sed -i "s~k2k4r8kxfnknsdf7tpyc46ks2jb3s9uvd3lqtcv9xlq9rsoem7jajd75~${ASTRONAUTENS}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
sed -i "s~k2k4r8kxfnknsdf7tpyc46ks2jb3s9uvd3lqtcv9xlq9rsoem7jajd75~${ASTRONAUTENS}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
|
|
||||||
sed -i "s~ipfs.infura.io~ipfs.copylaradio.com~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # USELESS ?!
|
sed -i "s~tube.copylaradio.com~ipfs.copylaradio.com~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
|
sed -i "s~ipfs.copylaradio.com~ipfs.copylaradio.com~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
|
|
||||||
#
|
#
|
||||||
sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or ipfs.localhost)
|
sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or ipfs.localhost)
|
||||||
|
@ -245,23 +254,23 @@ G1PUB=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
###########
|
###########
|
||||||
|
|
||||||
# Create"$PLAYER_feed" Key
|
# Create"$PLAYER_feed" Key
|
||||||
${MY_PATH}/keygen -t ipfs -o ~/.zen/game/players/$PLAYER/secret.feed "$SALT" "Feed"
|
FEEDNS=$(ipfs key gen "$PLAYER_feed")
|
||||||
FEEDNS=$(ipfs key import "$PLAYER_feed" -f pem-pkcs8-cleartext ~/.zen/game/players/$PLAYER/secret.feed)
|
|
||||||
|
|
||||||
## MAKE LightBeam Plugin Tiddler $PLAYER_feed
|
## MAKE LightBeam Plugin Tiddler $PLAYER_feed
|
||||||
# $:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key
|
# $:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key
|
||||||
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-name","text":"'${PLAYER}_feed'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-name.json
|
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-name","text":"'${PLAYER}_feed'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-name.json
|
||||||
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key","text":"'${FEEDNS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-key.json
|
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key","text":"'${FEEDNS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-key.json
|
||||||
|
|
||||||
echo "$PLAYER_feed"
|
### CREATE $NID ADDRESS FOR API & ROUND ROBIN FOR GW
|
||||||
cat ~/.zen/tmp/${MOATS}/lightbeam-key.json
|
cat ~/.zen/Astroport.ONE/templates/data/local.api.json | sed -i "s~_NID_~$NID~g" > ~/.zen/tmp/${MOATS}/local.api.json
|
||||||
|
cat ~/.zen/Astroport.ONE/templates/data/local.gw.json | sed -i "s~_NID_~https://ipfs.copylaradio.com~g" > ~/.zen/tmp/${MOATS}/local.gw.json
|
||||||
|
|
||||||
## ADD SYSTEM TW
|
## ADD SYSTEM TW
|
||||||
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html \
|
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html \
|
||||||
--import ~/.zen/tmp/${MOATS}/lightbeam-name.json "application/json" \
|
--import ~/.zen/tmp/${MOATS}/lightbeam-name.json "application/json" \
|
||||||
--import ~/.zen/tmp/${MOATS}/lightbeam-key.json "application/json" \
|
--import ~/.zen/tmp/${MOATS}/lightbeam-key.json "application/json" \
|
||||||
--import ~/.zen/Astroport.ONE/templates/data/local.api.json "application/json" \
|
--import ~/.zen/tmp/${MOATS}/local.api.json "application/json" \
|
||||||
--import ~/.zen/Astroport.ONE/templates/data/local.gw.json "application/json" \
|
--import ~/.zen/tmp/${MOATS}/local.gw.json "application/json" \
|
||||||
--output ~/.zen/tmp/${MOATS} --render "$:/core/save/all" "newindex.html" "text/plain"
|
--output ~/.zen/tmp/${MOATS} --render "$:/core/save/all" "newindex.html" "text/plain"
|
||||||
[[ -s ~/.zen/tmp/${MOATS}/newindex.html ]] && cp -f ~/.zen/tmp/${MOATS}/newindex.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
[[ -s ~/.zen/tmp/${MOATS}/newindex.html ]] && cp -f ~/.zen/tmp/${MOATS}/newindex.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue