diff --git a/shell/sms_BILLETCHK.sh b/shell/sms_BILLETCHK.sh index 53cf810..b0e0c1d 100755 --- a/shell/sms_BILLETCHK.sh +++ b/shell/sms_BILLETCHK.sh @@ -7,8 +7,8 @@ source ./shell/functions.sh log "X sms_BILLETCHK.sh $0" PHONE="$1" -CODE="$2 $3 $4 $5" -SEC="$6 $7 $8" +CODE="$2 $3" +SEC="$4 $5 $6 $7" # Construct billet path bpath=$(echo "$CODE" | sed 's/ /_/g') diff --git a/sms_received.sh b/sms_received.sh index 2a2c516..23ed95b 100755 --- a/sms_received.sh +++ b/sms_received.sh @@ -157,10 +157,10 @@ case "$CMD" in W5=$(echo "$TEXT" | awk '{print tolower($6)}' | grep -E "^[a-z0-9]+$") W6=$(echo "$TEXT" | awk '{print tolower($7)}' | grep -E "^[a-z0-9]+$") W7=$(echo "$TEXT" | awk '{print tolower($8)}' | grep -E "^[a-z0-9]+$") - if [[ "$W1" != "" && "$W2" != "" && "$W3" != "" && "$W4" != "" ]]; then + if [[ "$W1" != "" && "$W2" != "" ]]; then ./shell/sms_BILLETCHK.sh "$PHONE" "$W1" "$W2" "$W3" "$W4" "$W5" "$W6" "$W7" & else - ./shell/sms_ERROR.sh "$PHONE" "Mauvais Format. Le code doit comporter 4 mots pour vérifier la valeur du billet, 7 mots pour l'encaisser..." & + ./shell/sms_ERROR.sh "$PHONE" "Mauvais Format. Le code doit comporter 2 mots minimum pour vérifier la valeur du billet, + code secret pour l'encaisser..." & fi ;; TAG)