2007-12-03 05:48:31 +01:00
|
|
|
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
|
2007-12-06 04:50:15 +01:00
|
|
|
stop on shutdown
|
2007-12-03 05:48:31 +01:00
|
|
|
|
|
|
|
respawn ${postgresqlService}/bin/control start
|
|
|
|
";
|
|
|
|
}
|