diff --git a/shell/sms_ABO.sh b/shell/sms_ABO.sh index e3c77fb..28ff437 100755 --- a/shell/sms_ABO.sh +++ b/shell/sms_ABO.sh @@ -19,18 +19,14 @@ sms_INIT_ACCOUNT "$PHONE" case "$SERVICE" in ON) - log "Abonnement Kalkun" - if [[ "$MEMBER" != "" ]]; then - add_contact $PHONE $MEMBERUID && log "${c_green}Contact has been added to database$c_" || log "${c_red}Contact can't be added to database$c_"; - sms_SEND "$PHONE" "$MEMBER votre inscription annuaire est active" - fi + log "Abonnement Kalkun" + add_contact $PHONE $MEMBER && log "${c_green}Contact has been added to database$c_" || log "${c_red}Contact can't be added to database$c_"; + sms_SEND "$PHONE" "$MEMBER votre inscription annuaire est active" ;; OFF) log "Retrait Kalkun" - if [[ $MEMBER ]]; then - rm_contact $PHONE $MEMBERUID && log "${c_green}Contact has been deleted from database$c_" || log "${c_red}Contact can't be deleted database$c_"; - sms_SEND "$PHONE" "$MEMBER retrait annuaire prise en compte..." - fi + rm_contact $PHONE $MEMBER && log "${c_green}Contact has been deleted from database$c_" || log "${c_red}Contact can't be deleted database$c_"; + sms_SEND "$PHONE" "$MEMBER retrait annuaire prise en compte..." ;; MARCHE)