diff --git a/bin/createUser.sh b/bin/createUser.sh index cbcac8d..d921b3c 100755 --- a/bin/createUser.sh +++ b/bin/createUser.sh @@ -858,12 +858,18 @@ EOF" | tee -a "${CMD_MSG}" echo " # on envoie la confirmation d'inscription sur l'agora " | tee -a "${CMD_MSG}" #echo "docker exec -i mattermostServ bin/mmctl post create kaz:Creation-Comptes --message \"${MAIL_KAZ}\"" | tee -a "${CMD_MSG}" - cat <<'EOF' | tee -a "${CMD_MSG}" - curl -i -X POST -H 'Content-Type: application/json' \ - -d '{"channel": "creation-comptes","text": "${MAIL_KAZ}"}' \ - https://${URL_AGORA}/hooks/${token_webhook} -EOF + #pas réussi à le mettre dans CMD_MSG :(, je balance direct) + payload=$(jq -n \ + --arg channel "creation-comptes" \ + --arg text "$MAIL_KAZ" \ + '{channel: $channel, text: $text}') + + curl -i -X POST \ + -H "Content-Type: application/json" \ + -d "$payload" \ + "https://${URL_AGORA}/hooks/${token_webhook}" + # fin des inscriptions done <<< "${ALL_LINES}"