X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fresources%2Fscripts%2Foperation_curl.sh;fp=example%2Fdiameter%2Flauncher%2Fresources%2Fscripts%2Foperation_curl.sh;h=5cff3c74679e484ee469ede31d39ec6969325657;hb=431d322261ecfd6ef354abb392edbf8987e2407a;hp=0000000000000000000000000000000000000000;hpb=a8cde75abebb30020be4d9cb10d898f8986e124c;p=anna.git diff --git a/example/diameter/launcher/resources/scripts/operation_curl.sh b/example/diameter/launcher/resources/scripts/operation_curl.sh new file mode 100755 index 0000000..5cff3c7 --- /dev/null +++ b/example/diameter/launcher/resources/scripts/operation_curl.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +############# +# FUNCTIONS # +############# +_exit () { + echo -e "\n$1\n" + exit 1 +} + +############# +# EXECUTION # +############# +cd `dirname $0` +echo +# Get the HTTP Server: +[ ! -f .httpServer ] && _exit "Can't found '`pwd`/.httpServer' to use with curl tool." +SERVER=`cat .httpServer` + +# Send operation: +[ "$1" = "" ] && _exit "Usage: $0 ; i.e.: $0 help" +#> curl_log.txt +#TRACE="--trace-ascii curl_log.txt" +curl -m 1 --data "$1" $SERVER +