#!/bin/bash
cd `dirname $0`

RESULT=0
#curl -s  -H HOST:www.spintec.it http://10.1.0.1:8880/piva_to_addr/ -d key=1234567890 -d piva="$1" -d bridge=$MYIP:$BRPORT
#echo CURL=curl -s  http://10.1.0.1/e3g_services/piva_to_addr/index.php -d key=1234567890 -d piva="$1" -d bridge=$MYIP:$BRPORT
curl --max-time 10 --connect-timeout 4 -s  http://10.1.0.1/e3g_services/piva_to_addr/index.php -d key=1234567890 -d piva="$2" -d spinkey="$1"
if [ $? -gt 0 ]; then
  echo STATUS=ERROR_NETWORK
  RESULT=1
fi
#exit $RESULT
exit 0
