From 6240825e27436d77c2a5f66f651c4720f4ade268 Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Sun, 4 Mar 2012 12:58:09 +0000 Subject: [PATCH] mongodb: use the new upstart setuid option svn path=/nixos/trunk/; revision=32763 --- modules/services/databases/mongodb.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/services/databases/mongodb.nix b/modules/services/databases/mongodb.nix index caa6ebc5acf5..28d2a4f849c0 100644 --- a/modules/services/databases/mongodb.nix +++ b/modules/services/databases/mongodb.nix @@ -96,7 +96,7 @@ in jobs.mongodb = { description = "MongoDB server"; - daemonType = "fork"; + daemonType = "daemon"; startOn = "filesystem"; @@ -108,7 +108,9 @@ in fi ''; - exec = "${pkgs.shadow}/bin/su ${cfg.user} -c \"${mongodb}/bin/mongod --config ${mongoCnf}\""; + path = [mongodb]; + exec = "mongod --config ${mongoCnf} --fork"; + setuid = cfg.user; extraConfig = "kill timeout 10"; };