This commit is contained in:
qo-op 2020-05-12 02:48:45 +02:00
parent dce2486d9c
commit ac5bf8a0f5
3 changed files with 7 additions and 3 deletions

View File

@ -217,13 +217,15 @@ pubkey="$1"
[[ ! $pubkey ]] && echo "0" && exit
silkajQuantitativeAmountPattern='Total\sQuantitative\s+=\s+(.*)\s+Ğ1'
silkajExitCode=1
myi=1
while [ $silkajExitCode -ne 0 ]
do
duniter_server=$(/home/$YOU/.zen/astroport/zen/tools/duniter_getnode.sh)
log "Running silkaj -p "${duniter_server}" balance $pubkey"
silkajOutput=$(silkaj -p "${duniter_server}" balance $pubkey 2>/dev/null)
silkajExitCode=$?
((i++))
((myi++))
[ $i -gt 4 ] && continue
done

View File

@ -14,9 +14,11 @@ MEMBERUID="$2"
# Initialise PHONE, PIN, PUBKEY, UNIT
sms_INIT_ACCOUNT "$PHONE"
if [[ "$MEMBERUID" != "" && "$MEMBERUID" != "N" && "$MEMBERUID" != "D" && "$MEMBERUID" != "NOUV" ]]; then
# UID RECEIVED in SMS
log "# UID RECEIVED in SMS searching for $MEMBERUID"
VIRDEST=$MEMBERUID
MEMRIB=$(sms_uid2key "$MEMBERUID" "$PHONE" "$PIN")
log "# MEMRIB: $MEMRIB"
[[ $MEMRIB == "" ]] && exit 1
MEMBER="$MEMBERUID"
fi

View File

@ -8,7 +8,7 @@
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
[[ $YOU == "" ]] && echo "Please run ipfs daemon" && exit 1
if [[ $(whoami) == "root" ]]; then
echo "I am $(whoami), IPFS is run by $YOU. Changing /tmp/zen owner"