Fix dependencies of Apache and PostgreSQL

This commit is contained in:
Eelco Dolstra 2012-08-14 18:15:37 -04:00
parent a133eb5991
commit c2b2a3369a
2 changed files with 4 additions and 7 deletions

View File

@ -153,7 +153,8 @@ in
jobs.postgresql =
{ description = "PostgreSQL server";
startOn = "started network-interfaces and filesystem";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "fs.target" ];
environment =
{ TZ = config.time.timeZone;

View File

@ -581,12 +581,8 @@ in
jobs.httpd =
{ description = "Apache HTTPD";
startOn = "started networking and filesystem"
# Hacky. Some subservices depend on Postgres
# (e.g. Mediawiki), but they don't have a way to declare
# that dependency. So just start httpd after postgresql if
# the latter is enabled.
+ optionalString config.services.postgresql.enable " and started postgresql";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "fs.target" "postgresql.service" ];
path =
[ httpd pkgs.coreutils pkgs.gnugrep ]