add (optional) CC_HTTPPORT and JOB_HISTORY_SIZE to conf
diff --git a/pregelix/pregelix-dist/src/main/resources/scripts/startcc.sh b/pregelix/pregelix-dist/src/main/resources/scripts/startcc.sh
index 576fc1f..74b3e29 100644
--- a/pregelix/pregelix-dist/src/main/resources/scripts/startcc.sh
+++ b/pregelix/pregelix-dist/src/main/resources/scripts/startcc.sh
@@ -72,10 +72,27 @@
 #Enter the temp dir
 cd $CCTMP_DIR
 
-if [ -f "conf/topology.xml"  ]; then
-#Launch hyracks cc script with topology
-${PREGELIX_HOME}/bin/pregelixcc -client-net-ip-address $CCHOST -cluster-net-ip-address $CCHOST -client-net-port $CC_CLIENTPORT -cluster-net-port $CC_CLUSTERPORT -heartbeat-period 5000 -max-heartbeat-lapse-periods 4 -default-max-job-attempts 0 -job-history-size 0 -cluster-topology "conf/topology.xml" &> $CCLOGS_DIR/cc.log &
-else
-#Launch hyracks cc script without toplogy
-${PREGELIX_HOME}/bin/pregelixcc -client-net-ip-address $CCHOST -cluster-net-ip-address $CCHOST -client-net-port $CC_CLIENTPORT -cluster-net-port $CC_CLUSTERPORT -heartbeat-period 5000 -max-heartbeat-lapse-periods 4 -default-max-job-attempts 0 -job-history-size 0 &> $CCLOGS_DIR/cc.log &
+cmd=( "${PREGELIX_HOME}/bin/pregelixcc" )
+cmd+=( -client-net-ip-address $CCHOST -cluster-net-ip-address $CCHOST
+       -heartbeat-period 5000 -max-heartbeat-lapse-periods 4 
+       -default-max-job-attempts 0 )
+
+if [ -n "$CC_CLIENTPORT" ]; then
+    cmd+=( -client-net-port $CC_CLIENTPORT )
 fi
+if [ -n "$CC_CLUSTERPORT" ]; then
+    cmd+=( -cluster-net-port $CC_CLUSTERPORT )
+fi
+if [ -n "$CC_HTTPPORT" ]; then
+    cmd+=( -http-port $CC_HTTPPORT )
+fi
+if [ -n "$JOB_HISTORY_SIZE" ]; then
+    cmd+=( -job-history-size $JOB_HISTORY_SIZE )
+fi
+if [ -f "${PREGELIX_HOME}/conf/topology.xml"  ]; then
+    cmd+=( -cluster-topology "${PREGELIX_HOME}/conf/topology.xml" )
+fi
+
+printf "\n\n\n********************************************\nStarting CC with command %s\n\n" "${cmd[*]}" >> "$CCLOGS_DIR/cc.log"
+#Start the pregelix CC
+${cmd[@]} &>> "$CCLOGS_DIR/cc.log" &