Fix problem with post install job
[dmaap/buscontroller.git] / dbc-client / misc / dbc-client
index 775f719..e9b01f5 100644 (file)
@@ -25,7 +25,6 @@ umask 0022
 TZ=GMT0
 COMPONENT=dbc-client
 APP_ROOT=${APP_ROOT:-/opt/app/$COMPONENT}
-USER=root
 export TZ
 PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
 export PATH
@@ -40,7 +39,7 @@ PEMDIR=${PEMDIR:-/opt/app/osaaf/local}
 CAPEM=${CAPEM:-ca.pem}
 CLIENTPEM=${CLIENTPEM:-client.pem}
 KEYPEM=${KEYPEM:-key.pem}
-CERTPWD=${CERTPWD:-"2U[iOZzMHI:.#tdCwlBqc;}S"}
+CERTPWD=${CERTPWD:-'2U[iOZzMHI:.#tdCwlBqc;}S'}
 
 
 
@@ -58,7 +57,7 @@ config() {
        ls -l
        if [ -f $CAPEM  -a -f $CLIENTPEM -a -f $KEYPEM ]
        then
-               echo "--key $PEMDIR/$KEYPEM --cacert $PEMDIR/$CAPEM --cert $PEMDIR/${CLIENTPEM}:${CERTPWD}" > $PEMDIR/curl.cred
+               printf "key \"$PEMDIR/$KEYPEM\"\ncacert \"$PEMDIR/$CAPEM\"\ncert \"$PEMDIR/${CLIENTPEM}:${CERTPWD}\"" > $PEMDIR/curl.cred
                CURLCRED="-K $PEMDIR/curl.cred"
        else
                echo "Warning: PEM files for authorization not found!"