21 lines
1.1 KiB
Bash
Executable File
21 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function error_handler() {
|
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
|
exit "$2"
|
|
}
|
|
trap 'error_handler ${LINENO} $?' ERR
|
|
set -o errtrace -o errexit -o nounset -o pipefail
|
|
|
|
rramosKey="04ca2cf0599ace5def8543cb53e7fbd1d54ba65ab89f8794a08f9bf0406a7895c8074f380adf47a6692df0217cc81d2c680c6f50ef4149c84901f95c22a76bfa96"
|
|
jasonKey="04aa379d2661d6358f41b47a866f2674ca987e3398e93318ec08ea58b9f7035df491131a62ad3a469af609df9af58bcad698dac7f01e160130b7e187c60b824973"
|
|
kbKey="04e3ec4eb8a7c6b78f30b25ee2b2c34040ede4b9e51627ac82051bb37c4c3de21da0709bced20619566c545ff7b69fd58b8840cd48a686fffe68608f879bf9155b"
|
|
mikeKey="04622248490465b1d0cd5ec48375484682bec9a16f550ffd461cb803d4a8970a88cf8f99390a8e2216012602a9f8a0882ae86d773667d2802939150f3a14f1963a"
|
|
publicKey=$rramosKey
|
|
|
|
if [[ "${1-}" == "public" ]]; then
|
|
curl localhost:7005/sendMessage -X POST --data '{"message": "new_message7", "recipient": "testrramos", "message_type": "public"}'
|
|
else
|
|
curl -v localhost:7005/sendMessage -X POST --data '{"message": "new_message1", "recipient": "'$publicKey'", "message_type": "one_to_one"}'
|
|
fi
|