nixpkgs/upstart-jobs/postgresql.nix
Michael Raskin 3ba09e4004 Changed Postgresql upstart job not to stop on network down
svn path=/nixos/trunk/; revision=9867
2007-12-06 03:50:15 +00:00

30 lines
547 B
Nix

args: with args;
let
cfg = config.services.postgresql;
postgresqlService = import ../services/postgresql {
inherit (pkgs) stdenv postgresql su;
inherit (cfg) port logDir dataDir
subServices allowedHosts
authMethod;
serverUser = "postgres";
};
in
{
name = "postgresql";
users = [ {
name = "postgres";
description = "PostgreSQL server user";
} ];
groups = [{name = "postgres";}];
job = "
description \"PostgreSQL server\"
start on ${startDependency}/started
stop on shutdown
respawn ${postgresqlService}/bin/control start
";
}