Ticket #31155: solr.in.2.diff

File solr.in.2.diff, 816 bytes (added by humem (humem), 13 years ago)
  • files/solr.in

    old new  
    22
    33CMDNAME=`basename "$0"`
    44
    5 export JAVA_HOME=@JAVA_HOME@
    6 SOLR=@TARGET@
    7 
    85usage() {
    9     echo "Usage: ${CMDNAME} path/to/config/dir" 1>&2
     6    echo "Usage: ${CMDNAME} [-h|--help] [solr_home]" 1>&2
    107    exit 1
    118}
    129
    13 if [ -z "$1" ]; then
    14     usage
    15 else
    16     cd ${SOLR} && exec ${JAVA_HOME}/bin/java -Dsolr.solr.home="$1" -jar ${SOLR}/start.jar
    17 fi
     10SOLR_PATH=@solr_path@
     11SOLR_HOME=@solr_home@
     12
     13while test -n "$1"; do
     14    case "$1" in
     15        -h|--help) usage ;;
     16        *)         SOLR_HOME="$1";    shift ;;
     17    esac
     18done
     19
     20java -Dsolr.clustering.enabled=true \
     21     -Dsolr.solr.home="${SOLR_HOME}" \
     22     -Djetty.home="${SOLR_PATH}" \
     23     -jar ${SOLR_PATH}/start.jar