hydra-module: Allow to specify the listen host.

It's currently possible to specify the port but not the address or
interface you want to listen on.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2013-08-29 00:20:51 +02:00 committed by Eelco Dolstra
parent 0b202580ce
commit da5824e11c

View file

@ -58,6 +58,15 @@ in
''; '';
}; };
listenHost = mkOption {
default = "*";
example = "localhost";
description = ''
The hostname or address to listen on or <literal>*</literal> to listen
on all interfaces.
'';
};
port = mkOption { port = mkOption {
default = 3000; default = 3000;
description = '' description = ''
@ -202,7 +211,7 @@ in
after = [ "hydra-init.service" ]; after = [ "hydra-init.service" ];
environment = serverEnv; environment = serverEnv;
serviceConfig = serviceConfig =
{ ExecStart = "@${cfg.hydra}/bin/hydra-server hydra-server -f -h \* --max_spare_servers 5 --max_servers 25 --max_requests 100${optionalString cfg.debugServer " -d"}"; { ExecStart = "@${cfg.hydra}/bin/hydra-server hydra-server -f -h '${cfg.listenHost}' --max_spare_servers 5 --max_servers 25 --max_requests 100${optionalString cfg.debugServer " -d"}";
User = "hydra"; User = "hydra";
Restart = "always"; Restart = "always";
}; };