X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=delete_solr.sh;h=2b91d6514e1bd80c544efb21f60d3bc3829cc292;hb=bec3e484297f8be40cfde6ec40968b43397e5398;hp=8a586ae1ecab6a26829d17cfe5a0272e3d81b7ac;hpb=cc818b5486321d771aaa214a27f428c66e6d0438;p=lui-solr.git
diff --git a/delete_solr.sh b/delete_solr.sh
index 8a586ae..2b91d65 100755
--- a/delete_solr.sh
+++ b/delete_solr.sh
@@ -1,10 +1,14 @@
#!/bin/bash
if [ "$1" == "" ] ; then
- echo "No database id given"
+ echo "$0 databaseid [HOST:PORT] "
exit 1 ;
fi
-HOST=localhost
-PORT=8080
-curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary "database:$1"
-curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary ''
\ No newline at end of file
+HOSTPORT="localhost:8080"
+
+if [ "$2" != "" ] ; then
+ HOSTPORT="$2"
+fi
+
+curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary "database:$1"
+curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary ''