From b46b769505f16dd3cc1cf730a96c9dc8da2a0f01 Mon Sep 17 00:00:00 2001 From: Miguel De Anda Date: Sat, 5 Jul 2014 07:58:12 +0700 Subject: system/mongodb: Updated for version 2.6.3. Signed-off-by: Willy Sudiarto Raharjo --- system/mongodb/rc.mongodb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'system/mongodb/rc.mongodb') diff --git a/system/mongodb/rc.mongodb b/system/mongodb/rc.mongodb index d4771ecd1a..f00cc685c4 100644 --- a/system/mongodb/rc.mongodb +++ b/system/mongodb/rc.mongodb @@ -9,20 +9,26 @@ PID=/var/state/mongodb.pid LOG=/var/log/mongodb DBPATH=/var/lib/mongodb +USER=mongo +GROUP=mongo mongo_start() { - mkdir -p $DBPATH - /usr/bin/mongod \ + touch $LOG + chown $GROUP.$USER $LOG + touch $PID + chown $GROUP.$USER $PID + sudo -u $USER /usr/bin/mongod \ --dbpath=$DBPATH \ --fork \ --pidfilepath=$PID \ + --logappend \ --logpath=$LOG \ --nohttpinterface } mongo_stop() { kill `cat $PID` - rm $PID + # rm $PID } mongo_restart() { -- cgit v1.2.3