G1Billets and some more

This commit is contained in:
qo-op 2019-12-21 22:58:36 +01:00
parent 625e1aaba9
commit 27ea5c0103
20 changed files with 105 additions and 74 deletions

22
.install/2b-configure_gammu.sh Normal file → Executable file
View File

@ -8,15 +8,20 @@ source $MY_PATH/../.install/.GPATH
[[ -f $MY_PATH/../.profile ]] && source $MY_PATH/../.profile
## Désactive les processus écoutant le tty1
[[ $(sudo systemctl status getty@tty1.service | grep "loaded") ]] && sudo systemctl stop getty@tty1.service && sudo systemctl disable getty@tty1.service
[[ $(sudo systemctl status getty@tty1.service | grep "loaded" 2>/dev/null) ]] && sudo systemctl stop getty@tty1.service && sudo systemctl disable getty@tty1.service
## Copie et sed de /etc/gammu-smsdrc
[[ -f /etc/gammu-smsdrc ]] && sudo mv /etc/gammu-smsdrc /etc/gammu-smsdrc.old && echo "/etc/gammu-smsdrc a été renommé en /etc/gammu-smsdrc.old"
sudo cp $MY_PATH/templates/2b/gammu-smsdrc /etc/
if [[ -z $(grep "PIN" /etc/gammu-smsdrc) ]]; then
## Copie et sed de /etc/gammu-smsdrc
[[ -f /etc/gammu-smsdrc ]] && sudo mv /etc/gammu-smsdrc /etc/gammu-smsdrc.old && echo "/etc/gammu-smsdrc a été renommé en /etc/gammu-smsdrc.old"
sudo cp $MY_PATH/templates/2b/gammu-smsdrc /etc/
GPATHS=$(echo $GPATH | sed 's./.\\/.g')
sudo sed -i "s/_GPATH/$GPATHS/g" /etc/gammu-smsdrc
sudo sed -i "s/_PIN/$PIN/g" /etc/gammu-smsdrc
GPATHS=$(echo $GPATH | sed 's./.\\/.g')
sudo sed -i "s/_GPATH/$GPATHS/g" /etc/gammu-smsdrc
sudo sed -i "s/_PIN/$PIN/g" /etc/gammu-smsdrc
## Redémarre gammu-smsd
sudo service gammu-smsd restart && echo -e "${c_green}Gammu a été correctement configuré$c_" || echo -e "${c_green}Un problème est survenu lors de la configuration de gammu$c_"
fi
## Configure correctement le UART
@ -28,7 +33,4 @@ sudo sed -i "s/_PIN/$PIN/g" /etc/gammu-smsdrc
## Redémarre gammu-smsd
sudo service gammu-smsd restart && echo -e "${c_green}Gammu a été correctement configuré$c_" || echo -e "${c_green}Un problème est survenu lors de la configuration de gammu$c_"
exit 0

View File

@ -7,7 +7,8 @@
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
source $MY_PATH/.install/.GPATH
if [[ -f $MY_PATH/.install/.GPATH ]]; then source $MY_PATH/.install/.GPATH; fi
if [[ -f $MY_PATH/../.install/.GPATH ]]; then source $MY_PATH/../.install/.GPATH; fi
# Adapter les valeurs au contexte spatio-temporel du NODE G1SMS
function log () {

2
_chain
View File

@ -1 +1 @@
QmaN3w2NGxejb8yNN1sP4fvnfDV3YDghStcjbyLr7zchCC
QmdKvkQL65ibGXEBXGxZZu9a58udDCZPutC1NZQfFm9sDT

View File

@ -176,3 +176,4 @@ OK
2019-12-17: G1TAG REFRESH & more
2019-12-18: RAZ
2019-12-20: NOW
2019-12-21: Various

View File

@ -1 +1 @@
1576803110070568420
1576935242369880952

Binary file not shown.

BIN
shell/G1Billet_LOVE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 253 KiB

After

Width:  |  Height:  |  Size: 253 KiB

View File

@ -97,3 +97,12 @@ if [[ "$1" == "KALKUN" ]]; then
done
fi
##################################################################
##################################################################
if [[ "$1" == "TAG" ]]; then
##################################################################
for tag in ./TAG/*; do
echo $tag
done
fi
##################################################################

View File

@ -21,7 +21,7 @@ function sms_SEND () {
if [[ ${#dest} -eq 10 || ${#dest} -eq 12 ]]; then
if [[ -d ./wallets/$dest ]]; then
# TEST IF $dest IS ON CURRENT NODE
gammu-smsd-inject -l TEXT "$dest" -text "$mess" 1>&2
gammu-smsd-inject TEXT "$dest" -text "$mess" 1>&2
else
# Send SMS through $dest NODE (TODO: send it like PRINT, TASK, ...)
DESTNODEID=$(cat ./wallets_swarm/$dest/MASTERPHONE.ipfsid)

View File

@ -1,15 +1,15 @@
#!/bin/bash
##################################################################
# Author: poka (support@qo-op.com)
# Author: Fred (support@qo-op.com)
# Version: 0.1
# License: GPL (http://www.google.com/search?q=GPL)
##################################################################
# Adapter les valeurs au contexte spatio-temporel du NODE G1SMS
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
source $MY_PATH/../.install/.GPATH
source $MY_PATH/.install/.GPATH
# Adapter les valeurs au contexte spatio-temporel du NODE G1SMS
function log () {
# log ($1=text)
if [ "$DOLOG" == "YES" ]
@ -35,7 +35,7 @@ export G1SMS="YES"
fi
export YOU=$(ps aux --sort=+utime | grep ipfs | 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);
cd $GPATH
##################################################################
# Activate logging to /tmp/g1sms.log (YES/NO)
@ -65,13 +65,13 @@ fi
export NODECOMM=10
##################################################################
# SMS SIM Card Phone Number
export MASTERPHONE="+3368818767"
export ADRESSE="Blois"
export MASTERPHONE="+33651136520"
export ADRESSE="G1_Fablab_Toulouse"
export G1DAB="NO"
##################################################################
# ADMIN COMMAND PHONE ORIGIN
export ADMINPHONE="+33650573417"
export ADMINPSEUDO="poka"
export ADMINPHONE="+33647683646"
export ADMINPSEUDO="Fred"
##################################################################
# DUNITER/CESIUM+ DEFAULT SERVERS
export DUNITER="https://g1.duniter.org"

View File

@ -9,7 +9,8 @@
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
source $MY_PATH/../.install/.GPATH
if [[ -f $MY_PATH/.install/.GPATH ]]; then source $MY_PATH/.install/.GPATH; fi
if [[ -f $MY_PATH/../.install/.GPATH ]]; then source $MY_PATH/../.install/.GPATH; fi
YOU=$(ps aux --sort=+utime | grep ipfs | tail -n 1 | cut -d " " -f 1)
# TODO Make it directory independant. (for now it is tested for pi running ipfs and code in $HOME/G1sms+
@ -36,7 +37,10 @@ else
echo "${GPATH}/g1sms.pub.key"
echo "${GPATH}/g1sms.priv.key"
echo "Contactez nous sur https://g1sms.fr"
log "${GPATH}/g1sms.pub.key"
log "${GPATH}/g1sms.priv.key"
gammu-smsd-inject -l TEXT "$ADMINPHONE" -text "Clef de G1Wallet du SWARM g1sms.priv.key manquante! contactez-nous pour la recevoir https://g1sms.fr" 1>&2
gammu-smsd-inject -l TEXT "$ADMINPHONE" -text "Debug: ${GPATH}/g1sms.pub.key et ${GPATH}/g1sms.priv.key" 1>&2
exit
fi

View File

@ -9,7 +9,7 @@ source ./shell/init.sh
source ./shell/functions.sh
# Existence days number can be $1
if [[ "$1" ]]; then vieux="$1"; else vieux=180; fi
if [[ "$1" ]]; then vieux="$1"; else vieux=210; fi
if [[ "$2" ]]; then dest="$2"; else dest=$MASTERPUB; fi
echo "Recherche de G1Billets plus vieux que $vieux jours."

View File

@ -59,38 +59,43 @@ testmin=$( echo "${VIR} < ${MIN}" | bc -l )
log "TEST : $VIR < $MIN ? $testmin"
# silkaj NODE CHANGE !!!
SILKAJNODE=$(./shell/checknodes.sh)
log "NEW SILKAJ NODE: $SILKAJNODE"
#SILKAJNODE=$(./shell/checknodes.sh)
#log "NEW SILKAJ NODE: $SILKAJNODE"
if [[ "$testmin" -eq "1" ]]
then
# Clean MEMBER directory
rm -f ./billets/MEMBERS/$MEMBER/*.jpg
boucle=0;
while [ $boucle -lt $NBbillets ]
do
# Creation du numéro de billet
NUMBER=$(./shell/diceware.sh 4 | xargs)
NUMBER=$(./shell/diceware.sh 2 | xargs)
bpath=$(echo $NUMBER | sed 's/ /_/g')
# Cas d'un billet existant
while [ -d "./billets/$bpath" ]
do
NUMBER=$(./shell/diceware.sh 4 | xargs)
NUMBER=$(./shell/diceware.sh 2 | xargs)
bpath=$(echo $NUMBER | sed 's/ /_/g')
done
SECRET=$(./shell/diceware.sh 3 | xargs)
SALT=$(./shell/diceware.sh 3 | xargs)
# ADD/REMOVE G1sms forced control over G1Billet
# SALT=$(./shell/diceware.sh 3 | xargs)
SALT=""
boucle=$(bc -l <<< "$boucle + 1")
log "->BILLET:$PHONE:$NUMBER:$VALbillet:$UNIT"
# CREATE "NUMBER SECRET SALT" ACCOUNT for G1 transfert
TRANSAC=$(bc -l <<< "scale=2; $VIR / $NBbillets")
BILLETPUBKEY=$(./silkaj/silkaj generate_auth_file --auth-scrypt -salt="$NUMBER" -password="$SECRET $SALT")
BILLETPUBKEY=$(./silkaj/silkaj generate_auth_file --auth-scrypt -salt="$NUMBER" -password="$SECRET$SALT")
log_history $PHONE "BILLET, $TRANSAC, $BILLETPUBKEY"
sleep 3
# Fill BILLET with TRANSAC amount
PAY=$(./silkaj/silkaj transaction --auth-scrypt -salt="$PHONE" -password="$PIN" --amount="$TRANSAC" --output="$BILLETPUBKEY" --comment="THIRD_PARTY_MANAGER:$MASTERPUB:G1SMS:BILLET" -y)
PAY=$(./silkaj/silkaj transaction --auth-scrypt -salt="$PHONE" -password="$PIN" --amount="$TRANSAC" --output="$BILLETPUBKEY" --comment="G1Billet $NUMBER" -y)
if [[ "$(echo $PAY | cut -d '|' -f 1)" != "KO" ]]; then
mkdir -p "./billets/$bpath"
# NOTES ARE FILES STORED IN DICEWARE COMPOSED SUBDIR
@ -105,14 +110,16 @@ then
log "Remplissage: $TRANSAC G1... $BILLETPUBKEY = $PAY"
# CREATION FICHIER IMAGE BILLET
$(./shell/sms_BILLET_MAKE.sh "$NUMBER" "$SECRET" "$VALbillet" "$UNIT" "$DUFACTOR" "$BILLETPUBKEY" "$MEMBER" "$TRANSAC")
log "./shell/sms_BILLET_MAKE.sh \"$NUMBER\" \"$SECRET\" \"$VALbillet\" \"$UNIT\" \"$DUFACTOR\" \"$BILLETPUBKEY\" \"$MEMBER\" \"$TRANSAC\""
$(./shell/sms_BILLET_MAKE.sh "$NUMBER" "$SECRET" "$VALbillet" "$UNIT" "$TRANSAC" "$BILLETPUBKEY" "$MEMBER" "$TRANSAC" "$PHONE")
log "./shell/sms_BILLET_MAKE.sh \"$NUMBER\" \"$SECRET\" \"$VALbillet\" \"$UNIT\" \"$TRANSAC\" \"$BILLETPUBKEY\" \"$MEMBER\" \"$TRANSAC\" \"$PHONE\""
# Transaction to create Link BILLET <-> MEMBER RIB => Decrease BILLET value !
sleep 2
# PAY=$(./silkaj/silkaj transaction --auth-scrypt -salt="$NUMBER" -password="$SECRET $SALT" --amount="0.05" --output="$MEMRIB" --comment="THIRD_PARTY_MANAGER:$MASTERPUB:G1SMS:BILLET:$VALbillet:$UNIT:$NUMBER" -y)
else
sms_ERROR "$PHONE" "Un problème est survenu. Contactez $ADMINPSEUDO au $ADMINPHONE"
log "ERROR SILKAJ"
exit
fi
done
@ -120,22 +127,26 @@ then
sleep 2
COM=$(./silkaj/silkaj transaction --auth-scrypt -salt="$PHONE" -password="$PIN" --amount="$BILLCOM" --output="$MASTERPUB" --comment="[G1SMS] G1billet Commission" -y)
# IMPRIMER LES BILLETS! Brancher votre imprimante et configurer cups avant ;)
# POUR IMPRIMER LES BILLETS! Brancher votre imprimante, configurer cups, activer code lp ;)
num=$(date +%Y%m%d)
log "PRINT $num $MEMBER"
montage ./billets/MEMBERS/$MEMBER/*.jpg -tile 2x3 -geometry 964x459 /tmp/$PHONE_Bills_$bpath.pdf
# lp /tmp/$PHONE_Bills_$bpath.pdf
cp /tmp/$PHONE_Bills_$bpath.pdf ./billets/MEMBERS/$MEMBER/
zip ./_Bill_$MEMBER_$num.zip ./billets/MEMBERS/$MEMBER/*.jpg && rm -f ./billets/MEMBERS/$MEMBER/*.jpg
montage ./billets/MEMBERS/$MEMBER/*.jpg -tile 2x3 -geometry 964x459 /tmp/$PHONE_Bills_$bpath.pdf && rm -f ./billets/MEMBERS/$MEMBER/*.jpg && log "PDF made /tmp/$PHONE_Bills_$bpath.pdf"
zip /tmp/$PHONE_Bills_$bpath.zip /tmp/$PHONE_Bills_$bpath.pdf && rm -f /tmp/$PHONE_Bills_$bpath.pdf && log "Zip done. Remove PDF"
# SEND EMAIL
# Détruit ce mail et le pdf après impression et fabrication des billets au code caché.
# Créer la monnaie implique une grande responsabilité!
# SEND EMAIL ZIP attached
echo "Commande #$NANODATE/$bpath
>> Planche de 6 G1Billets : $VALbillet LOVE <<
Ecrivez-nous vos remarques...
Cesium: https://cesium.app
SMS: https://g1sms.fr" > /tmp/message_body.txt
mpack -s "[G1sms+]_G1Billets ($bpath) Imprimer + Scotch à gratter! Détruire cet email..." -d /tmp/message_body.txt /tmp/$PHONE_Bills_$bpath.zip $MAIL && rm /tmp/$PHONE_Bills_$bpath.zip && log "EMAIL sent....."
mpack -s "[G1sms+]_G1Billets ($bpath) imprimer recto/verso vos G1Billets?!" -d /tmp/message_body.txt ./Dos_G1Billets.odt $MAIL && log "+ EMAIL recto: OK"
log "G1Billets $PHONE_Bills_$bpath.pdf envoyé par email à $MEMBER : $MAIL "
mess="[G1SMS]
$NBbillets billet(s) de $VALbillet $UNIT ($TRANSAC G1) créé(s).
Contactez $ADMINPSEUDO au $ADMINPHONE pour les recevoir...
http://g1sms.fr/g1sms/aide"
$NBbillets G1Billets de $VALbillet $UNIT ($TRANSAC G1) créé(s).
Envoyés vers $MAIL, vérifiez vos SPAM...
Support: $ADMINPSEUDO ($ADMINPHONE)
"
sms_SEND "$phone" "$mess"

View File

@ -41,24 +41,22 @@ https://www.g1sms.fr/contact"
# Account creation
sms_INIT_ACCOUNT "$PHONE"
fi
log "./silkaj/silkaj transaction --auth-scrypt -salt=\"$CODE\" -password=\"$SEC $SALT\" --amount=\"$AMOUNTG1\" --output=\"$PUBKEY\" --comment=\"THIRD_PARTY_MANAGER:$MASTERPUB:G1SMS:ENCAISSEMENT:$CODE\" -y"
PAY=$(./silkaj/silkaj transaction --auth-scrypt -salt="$CODE" -password="$SEC $SALT" --amount="$AMOUNTG1" --output="$PUBKEY" --comment="THIRD_PARTY_MANAGER:$MASTERPUB:ENCAISSEMENT:$CODE" -y)
log "./silkaj/silkaj transaction --auth-scrypt -salt=\"$CODE\" -password=\"$SEC$SALT\" --amount=\"$AMOUNTG1\" --output=\"$PUBKEY\" --comment=\"THIRD_PARTY_MANAGER:$MASTERPUB:G1SMS:ENCAISSEMENT:$CODE\" -y"
PAY=$(./silkaj/silkaj transaction --auth-scrypt -salt="$CODE" -password="$SEC$SALT" --amount="$AMOUNTG1" --output="$PUBKEY" --comment="THIRD_PARTY_MANAGER:$MASTERPUB:ENCAISSEMENT:$CODE" -y)
if [[ "$(echo $PAY | cut -d '|' -f 1)" != "KO" ]]; then
# DESTROY BILLET
rm -f ./billets/$bpath/note.*
rmdir ./billets/$bpath
rm -Rf ./billets/$bpath
# DESTROY PUBLIC CACHE in /tmp
if [ -d "/tmp/billets_valides/$bpath" ]; then
rm -f /tmp/billets_valides/$bpath/*
rmdir /tmp/billets_valides/$bpath
rm -Rf /tmp/billets_valides/$bpath
fi
SOLDE=$(./silkaj/silkaj amount "$PUBKEY")
mess="[G1SMS]
ENCAISSEMENT de $VALbillet $UNIT ($AMOUNTG1 G1)
ds le porte-monnaie $PHONE ($PUBKEY)
dans portefeuille $UIDNA ($PHONE)
OK!
Solde: $SOLDE G1"
sms_SEND "$PHONE" "$mess"
@ -66,7 +64,7 @@ Solde: $SOLDE G1"
log "=> $PUBKEY"
log_history $PHONE "BILLET_CHK, $AMOUNTG1, $bpath, $PUBKEY"
else
sms_ERROR "$PHONE" "Erreur! Transaction Impossible... Réessayez plus tard ou contactez $ADMINPSEUDO : $ADMINPHONE"
sms_ERROR "$PHONE" "Erreur! Transaction Impossible! Valeur du G1Billet $AMOUNTG1 G1. Contactez $ADMINPSEUDO : $ADMINPHONE"
fi
fi
else

View File

@ -17,10 +17,11 @@ NUMERO="$1"
SECRET="$2"
MONTANT="$3"
UNIT="$4"
DUFACTOR="$5"
JUNE="$5"
NOTERIB="$6"
MEMBER="$7"
TRANSAC="$8"
PHONE="$9"
log "X ./shell/sms_BILLET_MAKE.sh \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\" \"$8\""
if [[ "$NOTERIB" == "" || "$MEMBER" == "" ]]
@ -43,17 +44,21 @@ fi
valid="0${valid:0:2}"
# ADD VALIDITY to convert: -pointsize 20 -draw 'text 380,410 "'"A encaisser avant le 01/$valid/$year"'"' \
# Add G1sms logo (250px)
composite -compose Over -gravity SouthWest -geometry +50+50 "./shell/G1sms.png" "./shell/Oeuro.jpg" "/tmp/$NUMERO.jpg"
# ADD Avatar on G1 Logo SouthEast
if [[ $(file "./wallets/$PHONE/$PHONE.avatar.png" | grep 'PNG') ]]; then
composite -compose Over -gravity East -geometry +15+0 -dissolve 33% "./wallets/$PHONE/$PHONE.avatar.png" "./shell/Oeuro.jpg" "/tmp/$NUMERO.jpg"
composite -compose Over -gravity West -geometry +15+0 -dissolve 33% "./wallets/$PHONE/$PHONE.avatar.png" "/tmp/$NUMERO.jpg" "/tmp/$NUMERO.jpg"
fi
# Add G1Billet_LOVE.png logo (250px)
composite -compose Over -gravity SouthWest -geometry +50+50 -dissolve 70% "./shell/G1Billet_LOVE.png" "/tmp/$NUMERO.jpg" "/tmp/$NUMERO.jpg"
# Prepare BILLET qrcode verification URL
#qrencode "$NOTERIB" -o "/tmp/$NUMERO_NOTERIB.png"
REQ=$(echo $NUMERO | sed 's/ /_/g')
qrencode "https://www.g1sms.fr/$ADMINPSEUDO/check.php?code=$REQ" -o "/tmp/$NUMERO_NOTERIB.png"
qrencode -s 3 -o "/tmp/$NUMERO_NOTERIB.png" "$NOTERIB"
# BILL PUBKEY => Someone can Add amount to it !!!
# BILL PUBKEY means Someone can Add amount to it !!!
# Add verification QRCode
composite -compose Over -gravity NorthEast -geometry +40+40 "/tmp/$NUMERO_NOTERIB.png" "/tmp/$NUMERO.jpg" "/tmp/$NUMERO.jpg"
composite -compose Over -gravity NorthEast -geometry +50+25 "/tmp/$NUMERO_NOTERIB.png" "/tmp/$NUMERO.jpg" "/tmp/$NUMERO.jpg"
# Add June logo
case "$MONTANT" in
@ -82,7 +87,7 @@ case "$MONTANT" in
cp "./shell/g1.png" "/tmp/g1.png"
;;
esac
composite -compose Over -gravity SouthEast -geometry +20+20 "/tmp/g1.png" "/tmp/$NUMERO.jpg" "/tmp/$NUMERO.jpg"
composite -compose Over -gravity SouthEast -geometry +20+20 -dissolve 90% "/tmp/g1.png" "/tmp/$NUMERO.jpg" "/tmp/$NUMERO.jpg"
DUPART=$(bc -l <<< "scale=2; $MONTANT / 100")
# ADD 0 to <1 DUPART
@ -95,11 +100,11 @@ fi
convert -font 'Liberation-Sans' \
-pointsize 120 -fill black -draw 'text 200,220 "'"$DUPART DU"'"' \
-pointsize 45 -draw 'text 550,270 "'"$MONTANT $UNIT"'"' \
-pointsize 35 -draw 'text 50,60 "'"[G1sms] 06 66 80 57 20"'"' \
-pointsize 35 -draw 'text 50,60 "'"$JUNE G1 [G1sms $MASTERPHONE]"'"' \
-pointsize 30 -draw 'text 60,100 "'"CHK $NUMERO"'"' \
-pointsize 22 -fill black -draw 'text 520,340 "'"$SECRET"'"' \
-pointsize 22 -fill black -draw 'text 400,410 "'"Encaisser avant le 01/$valid/$year"'"' \
-pointsize 20 -draw 'text 50,444 "'"Envoyer par sms, CHK $NUMERO + les mots découverts sous la zone à gratter"'"' \
-pointsize 22 -fill black -draw 'text 400,410 "'"A encaisser avant le 01/$valid/$year"'"' \
-pointsize 20 -draw 'text 50,444 "'"SMS: CHK $NUMERO + mots secrets à gratter ou https://cesium.app "'"' \
"/tmp/$NUMERO.jpg" "/tmp/BILL.$year.$valid.$NUMERO.$MONTANT.$UNIT.jpg"
# Payable par SMS en envoyant les codes grattant la case comportant le SECRET

View File

@ -36,7 +36,7 @@ fi
# SEND EMAIL WITH ssmtp
SUBJECT="[G1sms+] $MEMBER, message de votre portefeuille monnaie libre $UIDNA ($PHONE)"
MESSAGE="Bonjour $MEMBER\n\nLe detenteur du porte-monnaie G1sms $UIDNA ($PHONE) a choisi votre email comme contact.\nVous y recevrez nos prochains envois ...\n\n\nA bientot <3\n$ADMINPSEUDO - ($MASTERPHONE) Partenaire G1sms+"
MESSAGE="Bonjour $MEMBER\n\nVotre porte-monnaie G1sms $UIDNA ($PHONE) a choisi votre email comme contact.\nPour commander vos G1Billets, envoyez par SMS à $MASTERPHONE :\nBILL 10/20/50/100/200/500/1000\n\n\nA bientot <3\n$ADMINPSEUDO - ($MASTERPHONE) Partenaire G1sms+"
cat ./email.txt | sed s/EMAIL/"${mail}"/g | sed s/SUBJECT/"${SUBJECT}"/g | sed s/MESSAGE/"${MESSAGE}"/g | ssmtp ${mail}
log "__SUB:sms_EMAIL.sh.sh: Send welcome EMAIL to $mail via ssmtp"
log_history $PHONE "EMAIL, $mail"
@ -44,7 +44,7 @@ log_history $PHONE "EMAIL, $mail"
mess="[G1sms+]
$MEMBER
Votre email est : $mail
Mettez le à jour, quand cela est nécessaire..."
Mettez le à jour, si cela est nécessaire..."
sms_SEND "$phone" "$mess"

View File

@ -57,10 +57,10 @@ cat /dev/ttyACM0 | while read line; do
FID=$(echo $ID | awk '{print toupper($1)}')
RR=$(echo $ID | sed s/\ //g)
./shell/tools/4LETTER.scroll.py "G1TAG $FID >"
./shell/tools/4LETTER.scroll.py "${#act[@]} $FID > "
RVALUE=$(su $YOU -c "ipfs cat /ipns/$J/TAG_amount");
CURRENCY=$(su $YOU -c "ipfs cat /ipns/$J/TAG_currency" | awk '{print tolower($1)}')
if [[ "$CURRENCY" == "zen" ]]; then CUR="zène"; else CUR=$CURRENCY; fi # Correction du défaut de prononciation.
PASSENGER=$(su $YOU -c "ipfs cat /ipns/$J/TAG_passenger");
if [[ "$PASSENGER" != "" ]]; then
./shell/tools/4LETTER.scroll.py "G1TAG PASSENGER $RVALUE ZEN"
@ -87,10 +87,10 @@ cat /dev/ttyACM0 | while read line; do
FID=$(echo $ID | awk '{print toupper($1)}')
RR=$(echo $ID | sed s/\ //g)
./shell/tools/4LETTER.scroll.py "G1TAG [TX] $FID >"
./shell/tools/4LETTER.scroll.py "${#act[@]} $FID TX >>"
BVALUE=$(su $YOU -c "ipfs cat /ipns/$J/TAG_amount")
CURRENCY=$(su $YOU -c "ipfs cat /ipns/$J/TAG_currency" | awk '{print tolower($1)}')
if [[ "$CURRENCY" == "zen" ]]; then CUR="zène"; else CUR=$CURRENCY; fi # Correction du défaut de prononciation.
PASSENGER=$(su $YOU -c "ipfs cat /ipns/$J/TAG_passenger");
# DIG PUBLISHING KEY
if [[ -f /home/$YOU/.ipfs/keystore/$RR ]]; then
@ -122,7 +122,7 @@ cat /dev/ttyACM0 | while read line; do
*)
if [[ $lon -eq 44 ]]; then
./shell/tools/4LETTER.scroll.py "PORTEFEUILLE G1 >>>>>>>>" &
./shell/tools/4LETTER.scroll.py "PORTEFEUILLE G1 >>>>>>>> ${#act[@]}" &
J=$qrvalue
if [[ "$J" != "${obj[0]}" ]]; then
VALUE=$(./shell/timeout.sh -t 25 ./silkaj/silkaj amount $J)

View File

@ -34,7 +34,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
[[ -f /var/www/kalkun/scripts/daemon.sh ]] && /var/www/kalkun/scripts/daemon.sh
export YOU=$(ps aux --sort=+utime | grep ipfs | tail -n 1 | cut -d " " -f 1)
cd $GPATH
cd $MY_PATH
source $MY_PATH/shell/init.sh
source $MY_PATH/shell/functions.sh
@ -72,7 +72,7 @@ if [[ ! -f "./wallets/$PHONE/MASTERPHONE.sms" && "$CMD" != "ADMIN" ]]
then
NODEPHONE=$(cat "./wallets_swarm/$PHONE/MASTERPHONE.sms")
if [[ "$NODEPHONE" != "$MASTERPHONE" && "$NODEPHONE" != "" ]]; then
sms_SEND "$PHONE" "[G1sms+] Vous avez déjà un compte portefeuille sur $NODEPHONE (Envoyez lui DESTROY avant de pouvoir "
sms_SEND "$PHONE" "[G1sms+] Vous avez déjà un compte portefeuille sur $NODEPHONE (Envoyez lui RAZ si vous voulez fermer votre compte)"
log "ALERT!! $PHONE compte existant sur le NODE G1sms+ ($NODEPHONE)"
exit
fi