3
0
Fork 0
forked from mirrors/nixpkgs

mongodb: workaround for shutdown issues

svn path=/nixos/trunk/; revision=32083
This commit is contained in:
Peter Simons 2012-02-06 19:14:33 +00:00
parent 4249f803ad
commit 4f7985a1bd

View file

@ -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";
};