This would be a handy addition to solr-contrib.

The further evolution we had is that sometimes java freezes the the
'stop' command does not work. It is better to use the 'stop' command
than kill the process, so we added a sleep command that gave it maybe
30 seconds to shut down and then hit it with 'kill'. 'pkill -f
start.jar' is nice, wish we had known about it.

On Mon, Dec 7, 2009 at 2:35 PM, regany <re...@newzealand.co.nz> wrote:
>
>
> 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.
>
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to