From 4c806d99f90bc21f2c8efdba9b88a5d2adfdf55b Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Tue, 20 Aug 2013 13:19:57 +0200 Subject: [PATCH] Add scripts to package --- scripts/commit_solr.sh | 9 +++++++++ scripts/delete_solr.sh | 14 ++++++++++++++ scripts/optimize_solr.sh | 9 +++++++++ 3 files changed, 32 insertions(+) create mode 100644 scripts/commit_solr.sh create mode 100755 scripts/delete_solr.sh create mode 100755 scripts/optimize_solr.sh diff --git a/scripts/commit_solr.sh b/scripts/commit_solr.sh new file mode 100644 index 0000000..0cb3a43 --- /dev/null +++ b/scripts/commit_solr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$1" == "" ] ; then + echo "No database id given" + exit 1 ; +fi +HOST=localhost +PORT=8080 +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file diff --git a/scripts/delete_solr.sh b/scripts/delete_solr.sh new file mode 100755 index 0000000..2b91d65 --- /dev/null +++ b/scripts/delete_solr.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ "$1" == "" ] ; then + echo "$0 databaseid [HOST:PORT] " + exit 1 ; +fi +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 '' diff --git a/scripts/optimize_solr.sh b/scripts/optimize_solr.sh new file mode 100755 index 0000000..90d9a26 --- /dev/null +++ b/scripts/optimize_solr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$1" != "YES" ] ; then + echo "No confirmation given" + exit 1 ; +fi +HOST=localhost +PORT=8080 +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file -- 1.7.10.4