blob: 47894c4bf569411a04a56815bbabeb12bd3e2c15 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--- bin/solr.orig 2020-03-30 12:29:06 UTC
+++ bin/solr
@@ -2236,13 +2236,12 @@ function start_solr() {
echo ""
fi
# no lsof on cygwin though
- if 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=$(sockstat -ls -P tcp -p $SOLR_PORT | grep LISTEN)
if [ -z "$running" ]; then
slept=$((loops * 2))
if [ $slept -lt $SOLR_STOP_WAIT ]; then
@@ -2260,13 +2259,6 @@ function start_solr() {
fi
done) &
spinner $!
- else
- echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT."
- sleep 10
- SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r`
- echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n"
- return;
- fi
fi
}
|