Raw
1 #!/bin/bash
2
3 status_code=$(curl \
4 -X POST\
5 -H "Content-Type: application/json"\
6 -d '{"email":"'$1'", "password":"'$2'"}'\
7 --write-out %{http_code}\
8 http://localhost:9000/auth/user/emailpass)
9
10 if [[ "$status_code" -ne 200 ]] ; then
11 echo "Site status changed to $status_code"
12 exit 1
13 else
14 exit 0
15 fi