From: Dennis Schafroth Date: Thu, 25 Apr 2013 09:26:36 +0000 (+0200) Subject: Configurable host X-Git-Tag: v0.4.1~9 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=4771569b1f412673ce1aa9b020cc9132f199fd3b;p=lui-solr.git Configurable host --- 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 ''