From 4f7985a1bdcec064df08bcb7558512e8eb54a8ee Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 6 Feb 2012 19:14:33 +0000 Subject: [PATCH] mongodb: workaround for shutdown issues svn path=/nixos/trunk/; revision=32083 --- modules/services/databases/mongodb.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/services/databases/mongodb.nix b/modules/services/databases/mongodb.nix index cf8caabfc8a..1c46424c14b 100644 --- a/modules/services/databases/mongodb.nix +++ b/modules/services/databases/mongodb.nix @@ -96,9 +96,10 @@ in jobs.mongodb = { description = "MongoDB server"; + daemonType = "none"; + respawn = false; # seems to interfere with normal stopping startOn = "filesystem"; - daemonType = "daemon"; preStart = '' @@ -108,8 +109,8 @@ in fi ''; - exec = "${pkgs.shadow}/bin/su ${cfg.user} -c \"${mongodb}/bin/mongod --config ${mongoCnf} --fork\""; - preStop = "${pkgs.shadow}/bin/su ${cfg.user} -c \"${mongodb}/bin/mongod --config ${mongoCnf} --shutdown\" &"; + exec = "${pkgs.shadow}/bin/su ${cfg.user} -c \"${mongodb}/bin/mongod --config ${mongoCnf}\""; + preStop = "${pkgs.shadow}/bin/su ${cfg.user} -c \"${mongodb}/bin/mongod --config ${mongoCnf} --shutdown\""; extraConfig = "kill timeout 10"; };