diff options
author | kristina <k@wooster.(none)> | 2009-07-07 10:22:29 -0400 |
---|---|---|
committer | kristina <k@wooster.(none)> | 2009-07-07 10:22:29 -0400 |
commit | 3940f862a41d00a9e598937b0ebb4ab2b126abd0 (patch) | |
tree | 4f880618284716907f98cceba56b12cd00ac4a93 /debian | |
parent | b0dbe2735b168ccbde56fd6f5faab4cfbd17ab36 (diff) | |
download | mongo-3940f862a41d00a9e598937b0ebb4ab2b126abd0.tar.gz |
better init.d MINOR
Diffstat (limited to 'debian')
-rw-r--r-- | debian/init.d | 15 |
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 |