$NetBSD: patch-solr-bin,v 1.1 2020/06/09 22:20:01 jym Exp $

Use paths more suitable with a pkgsrc install.

--- bin/solr.orig	2020-04-08 05:03:49.000000000 +0000
+++ bin/solr
@@ -85,6 +85,7 @@ if [ -z "$SOLR_INCLUDE" ]; then
                /usr/share/solr/solr.in.sh \
                /usr/local/share/solr/solr.in.sh \
                /etc/default/solr.in.sh \
+               @PKG_SYSCONFDIR@/solr.in.sh \
                /opt/solr/solr.in.sh; do
     if [ -r "$include" ]; then
         SOLR_INCLUDE="$include"
@@ -1942,7 +1943,7 @@ fi
 if [ -z "$SOLR_LOGS_DIR" ]; then
   SOLR_LOGS_DIR="$SOLR_SERVER_DIR/logs"
 fi
-EXAMPLE_DIR="$SOLR_TIP/example"
+EXAMPLE_DIR="@SOLR_EXAMPLE@"
 if [ "${SOLR_HOME:0:${#EXAMPLE_DIR}}" = "$EXAMPLE_DIR" ]; then
   LOG4J_PROPS="$DEFAULT_SERVER_DIR/resources/log4j2.xml"
   SOLR_LOGS_DIR="$SOLR_HOME/../logs"
@@ -2236,13 +2237,13 @@ function start_solr() {
 	echo ""
     fi
     # no lsof on cygwin though
-    if lsof -v 2>&1 | grep -q revision; then
+    if @PREFIX@/sbin/lsof -v 2>&1 | grep -q revision; then
       echo -n "Waiting up to $SOLR_STOP_WAIT seconds to see Solr running on port $SOLR_PORT"
       # Launch in a subshell to show the spinner
       (loops=0
       while true
       do
-        running=$(lsof -t -PniTCP:$SOLR_PORT -sTCP:LISTEN)
+        running=$(@PREFIX@/sbin/lsof -t -PniTCP:$SOLR_PORT -sTCP:LISTEN)
         if [ -z "$running" ]; then
 	  slept=$((loops * 2))
           if [ $slept -lt $SOLR_STOP_WAIT ]; then
