Fork variant for TestStep command
[anna.git] / example / diameter / launcher / resources / scripts / operation_curl.sh
1 #!/bin/bash
2
3 #############
4 # FUNCTIONS #
5 #############
6 _exit () {
7   echo -e "\n$1\n"
8   exit 1
9 }
10
11 #############
12 # EXECUTION #
13 #############
14 cd `dirname $0`
15 echo
16 # Get the HTTP Server:
17 [ ! -f .httpServer ] && _exit "Can't found '`pwd`/.httpServer' to use with curl tool."
18 SERVER=`cat .httpServer`
19
20 # Send operation:
21 [ "$1" = "" ] && _exit "Usage: $0 <operation string>; i.e.: $0 help"
22 #> curl_log.txt
23 #TRACE="--trace-ascii curl_log.txt"
24 curl -m 1 --data "$1" $SERVER
25