SEND unplugged PLAYER LAST KNOW TW

This commit is contained in:
fred 2024-01-02 12:22:32 +01:00
parent 48c9103b9d
commit 05c3649e13
2 changed files with 5 additions and 2 deletions

View File

@ -38,7 +38,7 @@ floop=0
while [[ ! $(netstat -tan | grep 5001 | grep LISTEN) ]]; do
sleep 1
((floop++)) && [ $floop -gt 10 ] \
&& echo "ERROR. IPFS daemon not running on port 5001"
&& echo "ERROR. IPFS daemon not running on port 5001" \
&& espeak 'ERROR. IPFS daemon not started' \
&& exit 1
done

View File

@ -49,7 +49,6 @@ mkdir -p ~/.zen/tmp/${MOATS}
SECTORG1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}")
##############################################################
[[ ! ${SECTORG1PUB} ]] && echo "ERROR generating UMAP WALLET ${UPLANETNAME}${SECTOR}/${UPLANETNAME}${SECTOR}" && exit 1
COINS=$($MY_PATH/../tools/COINScheck.sh ${SECTORG1PUB} | tail -n 1)
echo "SECTOR WALLET = ${COINS} G1 : ${SECTORG1PUB}"
@ -66,6 +65,10 @@ mkdir -p ~/.zen/tmp/${MOATS}
ipfs key rm ${vk}
done
## SEND PLAYER LAST KNOW TW
TW=$(ipfs add -Hq ${INDEX} | tail -n 1)
${MY_PATH}/../tools/mailjet.sh "${PLAYER}" "<html><body>Hello ${PLAYER},<br> Your TW is unplugged from Astroport Station : <a href='${myIPFSGW}/ipfs/${TW}'>TW LAST STATE</a>.<br><br>May the force be with you.</body></html>"
echo "PLAYER IPNS KEYS UNPLUGED"
echo "rm -Rf ~/.zen/game/players/${PLAYER}"
rm -Rf ~/.zen/game/players/${PLAYER}