LOGOUT with G1Card

This commit is contained in:
fred 2023-09-04 00:24:43 +02:00
parent f9ca8a13a7
commit 09df72499f
1 changed files with 20 additions and 0 deletions

View File

@ -212,6 +212,26 @@ if [[ ${QRCODE:0:5} == "~~~~~" ]]; then
fi
##############################################
# LOGIN / LOGOUT
##############################################
if [[ $APPNAME == "logout" ]]; then
## REMOVE PLAYER IPNS KEY FROM STATION
PLAYER=${WHAT}
echo "<h1>$PLAYER LOGOUT OK</h1>" > ~/.zen/tmp/coucou/${MOATS}.log
ipfs key rm ${G1PUB} >> ~/.zen/tmp/coucou/${MOATS}.log
ipfs key rm ${PLAYER} >> ~/.zen/tmp/coucou/${MOATS}.log
echo "$HTTPCORS $(cat ~/.zen/tmp/coucou/${MOATS}.log)"| nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
end=`date +%s`
echo $APPNAME "(☉_☉ ) Execution time was "`expr $end - $start` seconds.
rm ~/.zen/tmp/coucou/${MOATS}.*
exit 0
fi
if [[ $APPNAME == "login" ]]; then
PLAYER=${WHAT}