summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorkristina <k@wooster.(none)>2009-07-07 10:22:29 -0400
committerkristina <k@wooster.(none)>2009-07-07 10:22:29 -0400
commit3940f862a41d00a9e598937b0ebb4ab2b126abd0 (patch)
tree4f880618284716907f98cceba56b12cd00ac4a93 /debian
parentb0dbe2735b168ccbde56fd6f5faab4cfbd17ab36 (diff)
downloadmongo-3940f862a41d00a9e598937b0ebb4ab2b126abd0.tar.gz
better init.d MINOR
Diffstat (limited to 'debian')
-rw-r--r--debian/init.d15
1 files changed, 11 insertions, 4 deletions
diff --git a/debian/init.d b/debian/init.d
index 8af7a73ceb0..20dd23ca20b 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -44,16 +44,23 @@
#
# High performance, scalability, and reasonable depth of
# functionality are the goals for the project.
-#
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/bin/mongod
-DAEMON_OPTS='--dbpath /var/lib/mongodb run'
+DAEMON=/usr/bin/mongod
+DATA=/var/lib/mongodb
+DAEMON_OPTS="--dbpath $DATA run"
NAME=MongoDB
DESC=database
-test -x $DAEMON || exit 0
+if test ! -x $DAEMON; then
+ echo "Could not find $DAEMON"
+ exit 0
+fi
+
+if test ! -x $DATA; then
+ mkdir $DATA || exit 0
+fi
. /lib/lsb/init-functions