Line 0
Link Here
|
|
|
1 |
--- bin/solr.orig 2017-04-15 09:06:51 UTC |
2 |
+++ bin/solr |
3 |
@@ -1757,13 +1757,12 @@ function launch_solr() { |
4 |
1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid" |
5 |
|
6 |
# no lsof on cygwin though |
7 |
- if hash lsof 2>/dev/null ; then # hash returns true if lsof is on the path |
8 |
echo -n "Waiting up to $SOLR_STOP_WAIT seconds to see Solr running on port $SOLR_PORT" |
9 |
# Launch in a subshell to show the spinner |
10 |
(loops=0 |
11 |
while true |
12 |
do |
13 |
- running=`lsof -PniTCP:$SOLR_PORT -sTCP:LISTEN` |
14 |
+ running=`sockstat -ls -P tcp -p $SOLR_PORT | grep LISTEN` |
15 |
if [ -z "$running" ]; then |
16 |
slept=$((loops * 2)) |
17 |
if [ $slept -lt $SOLR_STOP_WAIT ]; then |
18 |
@@ -1781,13 +1780,6 @@ function launch_solr() { |
19 |
fi |
20 |
done) & |
21 |
spinner $! |
22 |
- else |
23 |
- echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT." |
24 |
- sleep 10 |
25 |
- SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r` |
26 |
- echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n" |
27 |
- return; |
28 |
- fi |
29 |
fi |
30 |
} |
31 |
|