aboutsummaryrefslogtreecommitdiff
path: root/system/mongodb/rc.mongodb
diff options
context:
space:
mode:
Diffstat (limited to 'system/mongodb/rc.mongodb')
-rw-r--r--system/mongodb/rc.mongodb12
1 files changed, 9 insertions, 3 deletions
diff --git a/system/mongodb/rc.mongodb b/system/mongodb/rc.mongodb
index d4771ecd1a928..f00cc685c4922 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() {