Append /usr/sbin:/sbin to the path for searching mongodb

At least on SUSE, it is not installed in /usr/bin,
which means it can not be found as normal user.

Change-Id: I636cb16429962807d9e88ba87e494ac3c7e1e5a9
This commit is contained in:
Dirk Mueller 2013-09-02 18:33:14 +02:00
parent 4e3351bc25
commit 7a85b2d83e

View File

@ -25,6 +25,7 @@ fi
MONGO_DATA=`mktemp -d /tmp/CEILO-MONGODB-XXXXX` MONGO_DATA=`mktemp -d /tmp/CEILO-MONGODB-XXXXX`
trap "clean_exit" EXIT trap "clean_exit" EXIT
mkfifo ${MONGO_DATA}/out mkfifo ${MONGO_DATA}/out
export PATH=${PATH:+$PATH:}/sbin:/usr/sbin
mongod --maxConns 128 --nojournal --noprealloc --smallfiles --quiet --noauth --port 29000 --dbpath "${MONGO_DATA}" --bind_ip localhost &>${MONGO_DATA}/out & mongod --maxConns 128 --nojournal --noprealloc --smallfiles --quiet --noauth --port 29000 --dbpath "${MONGO_DATA}" --bind_ip localhost &>${MONGO_DATA}/out &
MONGO_PID=$! MONGO_PID=$!
# Wait for Mongo to start listening to connections # Wait for Mongo to start listening to connections