X-Git-Url: http://git.indexdata.com/?p=lui-solr.git;a=blobdiff_plain;f=delete_solr.sh;h=2b91d6514e1bd80c544efb21f60d3bc3829cc292;hp=8a586ae1ecab6a26829d17cfe5a0272e3d81b7ac;hb=72cc72aa3299c35b8acca109bb3889e50044d6cb;hpb=cc818b5486321d771aaa214a27f428c66e6d0438 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 ''