N Pseudo correction (Pb with silkaj timeout !!!)
This commit is contained in:
parent
f73ab4a140
commit
4f16a5dec0
|
@ -176,13 +176,15 @@ function sms_uid2key (){
|
|||
# else
|
||||
##################### REWRITE TODO
|
||||
# SEARCH WITH SILKAJ
|
||||
log "__SUB:sms_uid2key: GETTING FROM SILKAJ MEMBER ID"
|
||||
log "__SUB:sms_uid2key: silkaj -p $duniter_server id $ASKWALLET"
|
||||
DESTRIB=$(silkaj -p "$duniter_server" id "$ASKWALLET" | grep -w "$ASKWALLET" | awk '{print $2}' | tail -n 1)
|
||||
log "__SUB:sms_uid2key: OUT OFF SWARM MEMBER wallet: $DESTRIB"
|
||||
# GET CESIUM+ geoPoint DATA (TODO: cron for GCHANGE SMS Alert)
|
||||
curl -s ${CESIUM}/user/profile/${DESTRIB} | jq '._source.geoPoint' > "/home/$YOU/.zen/g1sms/$PHONE/_uidgeo.json"
|
||||
log "__SUB:sms_uid2key: GET CESIUM+ geoPoint and AVATAR : $(cat /home/$YOU/.zen/g1sms/$PHONE/_uidgeo.json)"
|
||||
curl -s ${CESIUM}/user/profile/${DESTRIB} | jq '._source.avatar._content' | sed 's/\"//g' | base64 -d > "/home/$YOU/.zen/g1sms/$PHONE/_avatar.png"
|
||||
if [[ "$DESTRIB" != "" ]]; then
|
||||
# GET CESIUM+ geoPoint DATA (TODO: cron for GCHANGE SMS Alert)
|
||||
curl -s ${CESIUM}/user/profile/${DESTRIB} | jq '._source.geoPoint' > "/home/$YOU/.zen/g1sms/$PHONE/_uidgeo.json"
|
||||
log "__SUB:sms_uid2key: GET CESIUM+ geoPoint and AVATAR : $(cat /home/$YOU/.zen/g1sms/$PHONE/_uidgeo.json)"
|
||||
curl -s ${CESIUM}/user/profile/${DESTRIB} | jq -r '._source.avatar._content' | base64 -d > "/home/$YOU/.zen/g1sms/$PHONE/_avatar.png"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$DESTRIB" != "" ]; then
|
||||
|
|
|
@ -22,7 +22,7 @@ if [[ "$MEMBERUID" != "" && "$MEMBERUID" != "N" && "$MEMBERUID" != "D" && "$MEMB
|
|||
VIRDEST=$MEMBERUID
|
||||
MEMRIB=$(sms_uid2key "$MEMBERUID" "$PHONE" "$PIN")
|
||||
log "# MEMRIB: $MEMRIB"
|
||||
[[ $MEMRIB == "" ]] && exit 1
|
||||
[[ $MEMRIB == "" ]] && sms_SEND "$PHONE" "Problème pour trouver $MEMBERUID , rééssayer dans 5 mn" && exit 1
|
||||
MEMBER="$MEMBERUID"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue