From 4771569b1f412673ce1aa9b020cc9132f199fd3b Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 25 Apr 2013 11:26:36 +0200 Subject: [PATCH] Configurable host --- delete_solr.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 '' -- 1.7.10.4