Fix checking of running mongod - test only open ports (not I-Node number)
This commit is contained in:
parent
eaf05d7cbc
commit
8af65e5194
@ -162,7 +162,7 @@ popd
|
|||||||
# says it's listening. mongod is not available on big endian arches (ppc64, s390(x)).
|
# says it's listening. mongod is not available on big endian arches (ppc64, s390(x)).
|
||||||
%ifnarch armv7hl ppc64 s390 s390x
|
%ifnarch armv7hl ppc64 s390 s390x
|
||||||
|
|
||||||
if [ "$(netstat -ln | grep 27017)" != "" ]
|
if [ "$(netstat -ln | grep :27017)" != "" ]
|
||||||
then
|
then
|
||||||
pkill mongod
|
pkill mongod
|
||||||
fi
|
fi
|
||||||
@ -170,7 +170,7 @@ fi
|
|||||||
mkdir ./mongod
|
mkdir ./mongod
|
||||||
mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log
|
mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log
|
||||||
# Give MongoDB some time to settle
|
# Give MongoDB some time to settle
|
||||||
while [ "$(netstat -ln | grep 27017)" == "" ]
|
while [ "$(netstat -ln | grep :27017)" == "" ]
|
||||||
do
|
do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user