refresh ~/.zen/tmp/$IPFSNODEID after 20H12

This commit is contained in:
fred 2024-03-31 14:39:50 +02:00
parent 5f33de4791
commit a443f0ff5b
5 changed files with 30 additions and 17 deletions

View File

@ -94,10 +94,12 @@ ${MY_PATH}/RUNTIME/NODE.refresh.sh
#####################################
## REMOVE TMP BUT KEEP swarm, flashmem and coucou
mv ~/.zen/tmp/${IPFSNODEID} ~/.zen/${IPFSNODEID}
mv ~/.zen/tmp/swarm ~/.zen/swarm
mv ~/.zen/tmp/coucou ~/.zen/coucou
mv ~/.zen/tmp/flashmem ~/.zen/flashmem
rm -Rf ~/.zen/tmp/*
mv ~/.zen/${IPFSNODEID} ~/.zen/tmp/${IPFSNODEID}
mv ~/.zen/swarm ~/.zen/tmp/swarm
mv ~/.zen/coucou ~/.zen/tmp/coucou
mv ~/.zen/flashmem ~/.zen/tmp/flashmem

View File

@ -164,6 +164,8 @@ for PLAYER in ${PLAYERONE[@]}; do
&& msg="${PLAYER} MadeInZion : BAD TW (☓‿‿☓) " && err="(☓‿‿☓)" && player="" \
|| player=$(cat ~/.zen/tmp/${MOATS}/MadeInZion.json | jq -r .[].player)
lang=$(cat ~/.zen/tmp/${MOATS}/MadeInZion.json 2>/dev/null | jq -r .[].dao)
[[ ${lang} == "null" ]] && lang="fr"
#############################################################
## CHECK "AstroID" Tiddler
tiddlywiki --load ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html \
@ -204,15 +206,6 @@ for PLAYER in ${PLAYERONE[@]}; do
DIFF_SECONDS=$(( SNOW - SBIRTH ))
days=$((DIFF_SECONDS / 60 / 60 / 24))
################################################## +2 DAYS AstroID !!
## REMOVE TW OLDER THAN 7 DAYS WITH AstroID
[[ -s ~/.zen/tmp/${MOATS}/AstroID.json && $days -gt 2 && "${CURRENT}" != "${PLAYER}" ]] \
&& ${MY_PATH}/PLAYER.unplug.sh "${HOME}/.zen/game/players/${PLAYER}/ipfs/moa/index.html" "${PLAYER}" "ALL" \
&& echo "(#__#) AstroID +7 DAYS = SECURITY ERROR (#__#)" && continue
[[ $days -eq 2 ]] \
&& echo "DAY 2" \
&&
################################################## ANOTHER ASTROPORT !!
IPNSTAIL=$(echo ${ASTROPORT} | rev | cut -f 1 -d '/' | rev) # Remove "/ipns/" part
########### ASTROPORT is not IPFSNODEID => EJECT TW
@ -228,6 +221,19 @@ for PLAYER in ${PLAYERONE[@]}; do
echo "CURCHAIN=${CURCHAIN}"
echo "================================== TW $days days old"
############################################## +2 DAYS & AstroID = UNPLUG !!
## REMOVE TW OLDER THAN 2 DAYS WITH AstroID
[[ -s ~/.zen/tmp/${MOATS}/AstroID.json && $days -gt 2 && "${CURRENT}" != "${PLAYER}" ]] \
&& ${MY_PATH}/PLAYER.unplug.sh "${HOME}/.zen/game/players/${PLAYER}/ipfs/moa/index.html" "${PLAYER}" "ALL" \
&& echo "(#__#) AstroID +2 DAYS = SECURITY ERROR (#__#)" && continue
#### SEND DAY2 ZINE
ZINE2="${MY_PATH}/../templates/UPlanetDAY2/index.${lang}.html"
[[ ! -s ${ZINE2} ]] && ZINE2="${MY_PATH}/../templates/UPlanetDAY2/index.html"
[[ $days -eq 2 ]] \
&& echo "ZINE2 DAY 2" \
&& ${MY_PATH}/../tools/mailjet.sh "${PLAYER}" ${ZINE2} "ZINE #2"
######################################
#### UPLANET GEO COORD EXTRACTION
## GET "GPS" TIDDLER - 0.00 0.00 (if empty: null)

View File

@ -86,10 +86,15 @@ else
fi
####### NO CURRENT ? PLAYER = .current
[[ ! -d $(readlink ~/.zen/game/players/.current) ]] \
&& rm -f ~/.zen/game/players/.current \
&& ln -s ~/.zen/game/players/${PLAYER} ~/.zen/game/players/.current
echo "ADMIN : "$(cat ~/.zen/game/players/.current/.player)
[[ ${OUTPUT} != "" ]] \
&& rm -f ~/.zen/game/players/.current \
&& ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current \
&& espeak "CONNECTED" \
&& espeak "${OUTPUT} CONNECTED" \
&& . "${MY_PATH}/tools/my.sh"
## NO PLAYER AT ALL
@ -101,7 +106,7 @@ fi
espeak "Hello $PSEUDO"
G1PUB=$(myPlayerG1Pub)
G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub)
[[ $G1PUB == "" ]] && espeak "ERROR NO G 1 PUBLIC KEY FOUND - EXIT" && exit 1
PLAYERNS=$(myPlayerNs) || { echo "noplayerns" && exit 1; }

View File

@ -103,8 +103,8 @@ done
PLAYER=$fav
####### NO CURRENT ? PLAYER = .current
[[ ! -e ~/.zen/game/players/.current ]] \
&& rm ~/.zen/game/players/.current 2>/dev/null \
[[ ! -d $(readlink ~/.zen/game/players/.current) ]] \
&& rm -f ~/.zen/game/players/.current \
&& ln -s ~/.zen/game/players/${PLAYER} ~/.zen/game/players/.current
pass=$(cat ~/.zen/game/players/$PLAYER/.pass 2>/dev/null)

View File

@ -21,7 +21,7 @@ href="/ipfs/QmeegmN4shouhnzvnDYpbSEJtdRsyy39SpL9XqYVHgtN44/style.css" />
<h1>TiddlyWiki</h1>
<p>Welcome, Traveler, to the innovative world of TW5—a TiddlyWiki postit-based personal data store designed to empower you on your journey through UPlanet.</p>
<!-- TODO: Your front cover content goes here, so you probably want a good title and maybe some kind of image -->
<img class="full-img" src="/ipfs/QmaDPopWqTZMPQYwv3Tt7kJAttWjg9JS2btE3EGmP91Hnj">
<img class="full-img" src="/ipfs/QmSM1XmD7gcH2sjGBicya9nzTh5TdA8s7AksbYbQZ4t5JY">
<h2>🌐 online and 🌴 offline<br>
<button class="print-button">📃 Print</button> ✂️ cut 🙏 fold 📘 share 💜</h2>
</header>
@ -78,7 +78,7 @@ href="/ipfs/QmeegmN4shouhnzvnDYpbSEJtdRsyy39SpL9XqYVHgtN44/style.css" />
<table class="zine-instructions">
<tr>
<td><b>Step 4:</b> Customize your email Tiddler: Each traveler have a Tiddler within their TW5 titled with their email address. This serves as a unique signature—a digital calling card that identifies them across the cosmos.</td>
<td><img class="mini-img" src="https://cdn.glitch.com/c10b2617-5888-415b-b574-42e2ab8f3484%2Fzine-fold-05.png">
<td><img class="mini-img" src="/ipfs/QmaDPopWqTZMPQYwv3Tt7kJAttWjg9JS2btE3EGmP91Hnj">
</td>
</tr>
<tr>