summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/mongodb.upstart6
-rw-r--r--debian/postinst4
-rw-r--r--debian/rules5
3 files changed, 10 insertions, 5 deletions
diff --git a/debian/mongodb.upstart b/debian/mongodb.upstart
index 6654f41b399..56478966238 100644
--- a/debian/mongodb.upstart
+++ b/debian/mongodb.upstart
@@ -5,6 +5,8 @@ pre-start script
mkdir -p /var/log/mongodb/
end script
-start on runlevel [345]
+start on runlevel [2345]
+stop on runlevel [06]
+
+exec start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/mongod -- --config /etc/mongodb.conf
-exec su -c "/usr/bin/mongod --config /etc/mongodb.conf" -s "/bin/sh" mongodb
diff --git a/debian/postinst b/debian/postinst
index 0bcc2e289e7..4d0e786ef87 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -29,11 +29,11 @@ case "$1" in
# create db -- note: this should agree with dbpath in mongodb.conf
mkdir -p /var/lib/mongodb
- chown mongodb:mongodb /var/lib/mongodb
+ chown -R mongodb:mongodb /var/lib/mongodb
# create logdir -- note: this should agree with logpath in mongodb.conf
mkdir -p /var/log/mongodb
- chown mongodb:mongodb /var/log/mongodb
+ chown -R mongodb:mongodb /var/log/mongodb
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/rules b/debian/rules
index d65daf5f174..2afdfdb942c 100644
--- a/debian/rules
+++ b/debian/rules
@@ -35,7 +35,10 @@ clean:
dh_testroot
rm -f build-stamp configure-stamp
- scons -c
+ # FIXME: scons freaks out at the presence of target files
+ # under debian/mongodb.
+ #scons -c
+ rm -rf $(CURDIR)/debian/mongodb
rm -f config.log
rm -f mongo
rm -f mongod