Skip to content
Snippets Groups Projects
Select Git revision
  • e513286753524d4f4cfaffeb6b593dc7bee6a16f
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

conf.py

Blame
  • sms_test.sh 1.66 KiB
    #!/bin/bash
    echo "Trash Testeur des Scripts G1SMS ('./sms_test.sh help' => Aide)"
    echo "##############################################################"
    
    if [[ $1 == "help" ]]; then
    echo "'help'
    Ce testeur permet de tester les scripts G1SMS sans déclencher l'envoi de SMS ni d'interactions avec la blockchain Duniter Ḡ1"
    echo "####################################################"
    echo "Surveiller l’exécution : 'tail -f /tmp/g1sms.log'"
    echo "####################################################"
    echo "IMPORTANT! Après utilisation, ne pas oublier de :
    1. Restaurer lien Silkaj en répondant NON, ou manuellement: 
    rm ./silkaj/silkaj && ln -s src/silkaj.py ./silkaj/silkaj
    2. Restaurer l'envoi de SMS en commentant la fonction 'gammu-smsd-inject' dans './shell/functions.sh'
    3. Adapter les valeurs de './shell/init.sh' pour passer en production
    
    export SMS_1_NUMBER='+33600000000'
    export SMS_1_TEXT='N'
    ./sms_received.sh 
    
    HAPPY G1SMS"
    exit
    fi
    
    
    echo "Désactiver Silkaj?? O (O/N)"
    read oui
    if [[ $oui == "N" ]]; then $(rm ./silkaj/silkaj && ln -s src/silkaj.py ./silkaj/silkaj);
    else $(rm ./silkaj/silkaj && ln -s ../fake_silkaj.sh ./silkaj/silkaj); fi
    
    # Define default numbers, randomly choosen
    arr[0]="+33600000000"
    arr[1]="+33612345678"
    rand=$[$RANDOM % ${#arr[@]}]
    num=${arr[$rand]}
    
    rand2=$[$RANDOM % ${#arr[@]}]
    num2=${arr[$rand2]}
    num2="0${num2:3:10}"
    
    # Ask for phone number
    echo "Numero ( $num ) ? "
    read SMS_1_NUMBER
    if [[ $SMS_1_NUMBER == "" ]]; then SMS_1_NUMBER="$num"; fi
    export SMS_1_NUMBER
    
    # Ask for SMS text
    echo "SMS ( A - N - C - U G1 - P $num2 100 ... )? A"
    read SMS_1_TEXT
    if [[ $SMS_1_TEXT == "" ]]; then SMS_1_TEXT="A"; fi
    export SMS_1_TEXT
    
    $(./sms_received.sh)