File: smoke-setup

package info (click to toggle)
libmongodb-perl 2.2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,292 kB
  • sloc: perl: 14,421; python: 299; makefile: 20; sh: 11
file content (13 lines) | stat: -rwxr-xr-x 388 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

set -e

PORT=${MONGOD#*:}

if [ -x /usr/bin/mongod ]; then
	mkdir $TDIR/build
	mongod --dbpath $TDIR/build --noprealloc --bind_ip 127.0.0.1 --nojournal --port $PORT --quiet --fork --logpath $TDIR/build/mongod.log --pidfilepath $TDIR/mongo.pid
	i=10
	until (/bin/netstat -want | grep -q 127.0.0.1:$PORT ) || [ $i = 0 ]; do sleep 1; i=$((i-1)); echo waiting for mongod; done
fi