diff --git a/_chain b/_chain index 493f092..953407d 100755 --- a/_chain +++ b/_chain @@ -1 +1 @@ -QmTDcHP1Nqy4SFzYCwuDH3JxvBT7fsdAKWQvrcvsVPMUpD +QmbRvGMpwZws4ii5xe5x8EgK1SSxNBaNNjinwdWjhye3TR diff --git a/_comments b/_comments index c06d6e2..7842c23 100755 --- a/_comments +++ b/_comments @@ -174,3 +174,4 @@ OK 2019-12-14: 2019-12-17: Better G1Tx 2019-12-17: G1TAG REFRESH & more +2019-12-18: RAZ diff --git a/_nanodate b/_nanodate index a017c9f..7778f6d 100755 --- a/_nanodate +++ b/_nanodate @@ -1 +1 @@ -1576604811163661452 +1576627244479575204 diff --git a/_publishkey.gpg b/_publishkey.gpg index 5a2f3c4..619e3dc 100755 Binary files a/_publishkey.gpg and b/_publishkey.gpg differ diff --git a/shell/cron_G1TAG_REFRESH.sh b/shell/cron_G1TAG_REFRESH.sh index ff4251d..de8eaec 100755 --- a/shell/cron_G1TAG_REFRESH.sh +++ b/shell/cron_G1TAG_REFRESH.sh @@ -67,7 +67,7 @@ for tag in ./wallets/.$IPFSNODEID/TAG/*; do rm /home/$YOU/.ipfs/keystore/${RR}.crypt fi echo "__SUB:cron_G1TAG_REFRESH.sh: G1Tag PUBLISHKEY OK : /home/$YOU/.ipfs/keystore/${RR}" - + echo ${NANODATE} > ./TAG/${RR}/TAG_nanodate # PUBLISH VERIFIED G1Tag VERSION I=$(su $YOU -c "ipfs add -qr ./TAG/${RR} | tail -n 1") # RECORD TAG_chain And HASH again diff --git a/shell/functions.sh b/shell/functions.sh index 20f82ec..7dbb9bf 100755 --- a/shell/functions.sh +++ b/shell/functions.sh @@ -116,8 +116,8 @@ if [[ $PHONE ]]; then rm -Rf ./wallets_swarm/$PHONE; fi su $YOU -c "ipfs get --output=./wallets_swarm/ /ipns/$IPFSNODEID" count=1 # Search for All peers Nodes. TODO: To be changed when Swarm is too bug or not expendanding -#for id in ./wallets_swarm/.Qm*/; -for id in $(su $YOU -c "ipfs swarm peers" | awk -F '/' '{print $7}'); +for id in ./wallets_swarm/.Qm*/; +#for id in $(su $YOU -c "ipfs swarm peers" | awk -F '/' '{print $7}'); do count=$((count+1)) id=$(echo $id | cut -d '.' -f 3 | cut -d '/' -f 1) diff --git a/shell/sms_ABO.sh b/shell/sms_ABO.sh old mode 100644 new mode 100755 index 7601a87..1686a3a --- a/shell/sms_ABO.sh +++ b/shell/sms_ABO.sh @@ -11,12 +11,28 @@ # TODO: Create information Channels and moderate OPT IN/OUT source ./shell/init.sh source ./shell/functions.sh -log "__SUB:sms_ABO.sh: START ($1=SERVICE, $2=YESNO)" -SERVICE=$1 -YESNO=$2 -PARAMS=$3 +log "__SUB:sms_ABO.sh: START ($1=PHONE, $2=SERVICE)" +PHONE=$1 +SERVICE=$2 + +sms_INIT_ACCOUNT "$PHONE" case "$SERVICE" in + ON) + log "Abonnement Kalkun" + if [[ "$MEMBER" != "" ]]; then + add_contact $MEMBER $PHONE && log "${c_green}Contact has been added to database$c_" || "${c_red}Contact can't be added to database$c_"; + sms_SEND "$PHONE" "$MEMBER votre inscription annuaire est active" + fi + ;; + OFF) + log "Retrait Kalkun" + if [[ $MEMBER ]]; then + rm_contact $MEMBER $PHONE && log "${c_green}Contact has been deleted from database$c_" || "${c_red}Contact can't be deleted database$c_"; + sms_SEND "$PHONE" "$MEMBER retrait annuaire prise en compte..." + fi + ;; + MARCHE) log "Avertissement G1 marchés" # PARAMS could be "$distance" to Member GeoPoint... diff --git a/sms_received.sh b/sms_received.sh index 2b4b461..4bf00d5 100755 --- a/sms_received.sh +++ b/sms_received.sh @@ -184,9 +184,8 @@ case "$CMD" in ;; ABO) # GERER SES ABONNEMENT CANAUX INFO SMS - CANAL=$(echo "$TEXT" | awk '{print $2}'| grep -E "([A-Za-z0-9\-\_]+$)") - YESNO=$(echo "$TEXT" | awk '{print $3}'| grep -E "([A-Za-z0-9\-\_]+$)") - ./shell/sms_ABO.sh "$PHONE" "$CANAL" "$YESNO" & + SERVICE=$(echo "$TEXT" | awk '{print toupper($2)}'| grep -E "([A-Za-z0-9\-\_]+$)") + ./shell/sms_ABO.sh "$PHONE" "$SERVICE" & ;; DELIVERED|PENDING|FAILED) # If delivered/pending notification come back (gammu/phone config)