Lee Smith-6 wrote:
> 
> So how can I stop and restart the service ?
> 
> Hope you can help get me going again.
> 
> Thank you
> Lee
> 


I found this shell script which works well for me...


#!/bin/sh -e

# Starts, stops, and restarts solr

SOLR_DIR="/usr/local/solr/example"
JAVA_OPTIONS="-Xmx1024m -DSTOP.PORT=8079 -DSTOP.KEY=stopkey -jar start.jar"
LOG_FILE="/var/log/solr.log"
JAVA="/usr/bin/java"

case $1 in
    start)
        echo "Starting Solr"
        cd $SOLR_DIR
        $JAVA $JAVA_OPTIONS 2> $LOG_FILE &
        ;;
    stop)
        echo "Stopping Solr"
        cd $SOLR_DIR
        $JAVA $JAVA_OPTIONS --stop
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}" >&2
        exit 1
        ;;
esac

-- 
View this message in context: 
http://old.nabble.com/Stopping---Starting-tp26633950p26685498.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to