Silent post to get respnse code
[dmaap/buscontroller.git] / dbc-client / misc / dbc-client
index cf6c230..8df970c 100644 (file)
@@ -33,8 +33,8 @@ CONFIGMAP_ROOT=${CONFIGMAP_ROOT:-/opt/app/config}
 CONTAINER_CONFIG=$CONFIGMAP_ROOT/conf/dbc-client.env
 REQUESTID=${REQUESTID:-dbc-client}
 DBC=${DBC:-dmaap-bc}
-PROTO=${PROTO:-http}
-PORT=${PORT:-8080}
+PROTO=${PROTO:-https}
+PORT=${PORT:-8443}
 
 
 
@@ -65,13 +65,6 @@ config() {
                echo "Not creating $APP_ROOT/ok_to_exit"
        fi      
        
-       if [ ! -f $APP_ROOT/misc/cert-client-init.sh ]
-       then
-               echo "Did not find $APP_ROOT/misc/cert-client-init.sh to append to truststore"
-               exit 1
-       fi
-       $APP_ROOT/misc/cert-client-init.sh
-
        set +x
 }
 
@@ -98,9 +91,9 @@ dopost() {
 
        loop=true
 
-       while [ $loop ]
+       while [ $loop = true ]
        do
-               rc=`curl -v -X POST -w "%{http_code}" -H "X-ECOMP-RequestID: $REQUESTID" -H "Content-Type: application/json" -d @${1} ${PROTO}://${DBC}:${PORT}/webapi/${2}`
+               rc=`curl -s -X POST -w "%{http_code}" -H "X-ECOMP-RequestID: $REQUESTID" -H "Content-Type: application/json" -d @${1} ${PROTO}://${DBC}:${PORT}/webapi/${2} -o /dev/null`
                case $rc in
                200 | 201 | 409 )
                        echo "response=$rc"