Fix checking of running mongod - test only open ports (not I-Node number)

This commit is contained in:
Marek Skalický 2018-06-26 15:08:04 +02:00
parent eaf05d7cbc
commit 8af65e5194
No known key found for this signature in database
GPG Key ID: ADCAA1DEE100A66D

View File

@ -162,7 +162,7 @@ popd
# says it's listening. mongod is not available on big endian arches (ppc64, s390(x)).
%ifnarch armv7hl ppc64 s390 s390x
if [ "$(netstat -ln | grep 27017)" != "" ]
if [ "$(netstat -ln | grep :27017)" != "" ]
then
pkill mongod
fi
@ -170,7 +170,7 @@ fi
mkdir ./mongod
mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log
# Give MongoDB some time to settle
while [ "$(netstat -ln | grep 27017)" == "" ]
while [ "$(netstat -ln | grep :27017)" == "" ]
do
sleep 1
done