Added JBoss service

svn path=/nixos/trunk/; revision=10309
This commit is contained in:
Sander van der Burg 2008-01-28 15:16:14 +00:00
parent 4341ef80d8
commit 8d5884e01f
3 changed files with 63 additions and 0 deletions

View File

@ -985,6 +985,42 @@
};
jboss = {
tempDir = mkOption {
default = "/tmp";
description = "Location where JBoss stores its temp files";
};
logDir = mkOption {
default = "/var/log/jboss";
description = "Location of the logfile directory of JBoss";
};
serverDir = mkOption {
description = "Location of the server instance files";
default = "/var/jboss/server";
};
deployDir = mkOption {
description = "Location of the deployment files";
default = "/nix/var/nix/profiles/default/server/default/deploy/";
};
libUrl = mkOption {
default = "file:///nix/var/nix/profiles/default/server/default/lib";
description = "Location where the shared library JARs are stored";
};
user = mkOption {
default = "nobody";
description = "User account under which jboss runs.";
};
useJK = mkOption {
default = false;
description = "Whether to use to connector to the Apache HTTP server";
};
};
httpd = {

View File

@ -182,6 +182,12 @@ let
"gw6c" else "network-interfaces";
})
# JBoss service
++ optional config.services.jboss.enable
(import ../upstart-jobs/jboss.nix {
inherit config pkgs;
})
# Samba service.
++ optional config.services.samba.enable
(import ../upstart-jobs/samba.nix {

21
upstart-jobs/jboss.nix Normal file
View File

@ -0,0 +1,21 @@
args: with args;
let
cfg = config.services.jboss;
jbossService = import ../services/jboss {
inherit (pkgs) stdenv jboss su;
inherit (cfg) tempDir logDir libUrl deployDir serverDir user useJK;
};
in
{
name = "jboss";
job = "
description \"JBoss server\"
stop on shutdown
respawn ${jbossService}/bin/control start
";
}