RESPECT LOWMODE
This commit is contained in:
parent
df1eea0397
commit
677afd7535
@ -19,9 +19,10 @@ echo "$ME RUNNING"
|
|||||||
## G1PalPAY incoming TX detected call
|
## G1PalPAY incoming TX detected call
|
||||||
## ./ASTROBOT/${CMD}.sh ${INDEX} ${PLAYER} ${MOATS} ${TXIPUBKEY} ${TH} ${TRAIL} ${TXIAMOUNT}
|
## ./ASTROBOT/${CMD}.sh ${INDEX} ${PLAYER} ${MOATS} ${TXIPUBKEY} ${TH} ${TRAIL} ${TXIAMOUNT}
|
||||||
########################################################################
|
########################################################################
|
||||||
## TH=/ipfs/CID (mp4 source file to transcript "voice 2 text" or other depending MODE)
|
## TH=/ipfs/CID (source file to pass to AIApi)
|
||||||
## TRAIL=MODE:G1PUB (what to do and where to send response)
|
## TRAIL=MODE:G1PUB (what API function and who to send response)
|
||||||
# default: mp4TOtxt and alert back to emiter
|
## DEFAULT /g1vlog and alert back to emiter
|
||||||
|
## AIApi : https://github.com/papiche/AiApi
|
||||||
########################################################################
|
########################################################################
|
||||||
## THIS SCRIPT IS RUN WHEN A WALLET RECEIVED A TRANSACTION WITH COMMENT STARTING WITH N1GPU:
|
## THIS SCRIPT IS RUN WHEN A WALLET RECEIVED A TRANSACTION WITH COMMENT STARTING WITH N1GPU:
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -40,18 +41,21 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w ${PLAYER} | cut -d ' ' -f1)
|
|||||||
G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub)
|
G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub)
|
||||||
[[ ! $G1PUB ]] && echo "FATAL ERROR - G1PUB ${PLAYER} VIDE. LOCAL PLAYER ONLY." && exit 1
|
[[ ! $G1PUB ]] && echo "FATAL ERROR - G1PUB ${PLAYER} VIDE. LOCAL PLAYER ONLY." && exit 1
|
||||||
|
|
||||||
# Extract tag=tube from TW
|
|
||||||
MOATS="$3"
|
MOATS="$3"
|
||||||
[[ ! ${MOATS} ]] && MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
[[ ! ${MOATS} ]] && MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||||
|
|
||||||
|
## CREDIT SOURCE
|
||||||
IPUBKEY="$4"
|
IPUBKEY="$4"
|
||||||
[[ ! ${IPUBKEY} ]] && echo "ERROR 4 - MISSING COMMAND ISSUER !" && exit 1
|
[[ ! ${IPUBKEY} ]] && echo "ERROR 4 - MISSING COMMAND ISSUER !" && exit 1
|
||||||
|
|
||||||
|
## IPFS CID
|
||||||
TH="$5"
|
TH="$5"
|
||||||
[[ ! ${TH} ]] && echo "ERROR 5 - MISSING COMMAND TITLE HASH ADDRESS !" && exit 1
|
[[ ! ${TH} ]] && echo "ERROR 5 - MISSING IPFS CID !" && exit 1
|
||||||
|
|
||||||
TRAIL="$6" ## ::G1PUB
|
TRAIL="$6" ## ::G1PUB
|
||||||
MODE=$(echo ${TRAIL} | cut -d ':' -f 1)
|
API=$(echo ${TRAIL} | cut -d ':' -f 1)
|
||||||
|
[[ -z $API ]] && API="/g1vlog"
|
||||||
|
|
||||||
GIPUBKEY=$(echo ${TRAIL} | cut -d ':' -f 2-)
|
GIPUBKEY=$(echo ${TRAIL} | cut -d ':' -f 2-)
|
||||||
[[ ! -z ${GIPUBKEY} ]] \
|
[[ ! -z ${GIPUBKEY} ]] \
|
||||||
&& DPUBKEY=${GIPUBKEY} \
|
&& DPUBKEY=${GIPUBKEY} \
|
||||||
@ -60,15 +64,22 @@ GIPUBKEY=$(echo ${TRAIL} | cut -d ':' -f 2-)
|
|||||||
AMOUNT="$7"
|
AMOUNT="$7"
|
||||||
[[ ! ${AMOUNT} ]] && echo "ERROR 7 - AMOUNT=$7 7 " && exit 1
|
[[ ! ${AMOUNT} ]] && echo "ERROR 7 - AMOUNT=$7 7 " && exit 1
|
||||||
|
|
||||||
|
echo "API : $API"
|
||||||
|
echo "Sender : ${IPUBKEY})
|
||||||
|
Amount : ${AMOUNT} G1
|
||||||
|
... Reply To : $DPUBKEY"
|
||||||
|
|
||||||
|
## AMOUNT & RESTRICTION ...
|
||||||
|
|
||||||
echo "${PLAYER} : ${IPUBKEY} ASK FOR PROCESSING ${TH}
|
echo "${PLAYER} : ${IPUBKEY} ASK FOR PROCESSING ${TH}
|
||||||
${TRAIL}"
|
${TRAIL}"
|
||||||
|
|
||||||
#~ ###################################################################
|
#~ ###################################################################
|
||||||
#~ ## CREATE APP NODE PLAYER PUBLICATION DIRECTORY
|
#~ ## CREATE WORKING TEMP DIRECTORY
|
||||||
#~ ###################################################################
|
#~ ###################################################################
|
||||||
mkdir -p $HOME/.zen/tmp/${MOATS} && echo $HOME/.zen/tmp/${MOATS}
|
mkdir -p $HOME/.zen/tmp/${MOATS} && echo $HOME/.zen/tmp/${MOATS}
|
||||||
|
|
||||||
|
## GET IPFS PARAMETER
|
||||||
RESPIPFS="/ipfs/"$(ipfs add -q "$RESP")
|
RESPIPFS="/ipfs/"$(ipfs add -q "$RESP")
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,6 +105,9 @@ while true; do
|
|||||||
PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null))
|
PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null))
|
||||||
[[ ${PLAYERONE[@]} == "" ]] && echo "EMPTY ASTROPORT - NO PLAYER - NO PUBLISHING" && continue
|
[[ ${PLAYERONE[@]} == "" ]] && echo "EMPTY ASTROPORT - NO PLAYER - NO PUBLISHING" && continue
|
||||||
|
|
||||||
|
# RESPECT LOWMODE. REMOVE THAT LINE TO FORCE IPFS WAKING UP
|
||||||
|
[[ $(sudo systemctl status ipfs | grep disabled) != "" ]] && continue
|
||||||
|
|
||||||
## CHECK IF IPFS NODE IS RESPONDING
|
## CHECK IF IPFS NODE IS RESPONDING
|
||||||
ipfs --timeout=30s swarm peers 2>/dev/null > ~/.zen/tmp/ipfs.swarm.peers
|
ipfs --timeout=30s swarm peers 2>/dev/null > ~/.zen/tmp/ipfs.swarm.peers
|
||||||
[[ ! -s ~/.zen/tmp/ipfs.swarm.peers || $? != 0 ]] \
|
[[ ! -s ~/.zen/tmp/ipfs.swarm.peers || $? != 0 ]] \
|
||||||
|
Loading…
Reference in New Issue
Block a user