echo "No confirmation given"
exit 1 ;
fi
-HOST=localhost
-PORT=8080
-curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '<optimize waitSearcher="false" />'
\ No newline at end of file
+
+HOST_PORT=localhost:8080
+
+if [ "$2" != "" ] ; then
+ HOST_PORT="$2"
+fi
+
+curl http://${HOST_PORT}/solr/update -H "Content-Type: text/xml" --data-binary '<optimize waitSearcher="false" />'
\ No newline at end of file