summaryrefslogtreecommitdiff
path: root/community/mongodb/mongodb.rc
diff options
context:
space:
mode:
Diffstat (limited to 'community/mongodb/mongodb.rc')
-rwxr-xr-xcommunity/mongodb/mongodb.rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/community/mongodb/mongodb.rc b/community/mongodb/mongodb.rc
index 517258f63..30f2bbf79 100755
--- a/community/mongodb/mongodb.rc
+++ b/community/mongodb/mongodb.rc
@@ -4,7 +4,7 @@
. /etc/rc.conf
. /etc/rc.d/functions
-PID=`pidof /usr/bin/mongod`
+PID=$(pidof /usr/bin/mongod)
case "$1" in
start)
stat_busy "Starting mongodb"
@@ -18,7 +18,7 @@ case "$1" in
;;
stop)
stat_busy "Stopping mongodb"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
+ [ ! -z "$PID" ] && /bin/su mongodb -c "/usr/bin/mongod --config /etc/mongodb.conf --shutdown" &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else