Skip to content

Commit

Permalink
hydra-module: Don't assume hydra is running on localhost.
Browse files Browse the repository at this point in the history
In the long run we should add retry logic to hydra-init...
  • Loading branch information
shlevy committed May 29, 2015
1 parent a91cbef commit bc36c7d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hydra-module.nix
Expand Up @@ -186,8 +186,6 @@ in

systemd.services."hydra-init" =
{ wantedBy = [ "multi-user.target" ];
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
environment = env;
preStart = ''
mkdir -m 0700 -p ${baseDir}/data
Expand All @@ -206,7 +204,10 @@ in
serviceConfig.User = "hydra";
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
};
} // (optionalAttrs (cfg.dbi == "dbi:Pg:dbname=hydra;user=hydra;") {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
});

systemd.services."hydra-server" =
{ wantedBy = [ "multi-user.target" ];
Expand Down

0 comments on commit bc36c7d

Please sign in to comment.