Added ejabberd service

svn path=/nixos/trunk/; revision=10495
This commit is contained in:
Sander van der Burg 2008-02-04 13:40:01 +00:00
parent 707e515f82
commit 90f34e204d
3 changed files with 40 additions and 0 deletions

View File

@ -1049,6 +1049,18 @@
};
ejabberd = {
enable = mkOption {
default = false;
description = "Whether to enable ejabberd server";
};
user = mkOption {
default = "nobody";
description = "User account under which ejabberd runs.";
};
};
jboss = {
enable = mkOption {
default = false;

View File

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

22
upstart-jobs/ejabberd.nix Normal file
View File

@ -0,0 +1,22 @@
args: with args;
let
cfg = config.services.ejabberd;
ejabberdService = import ../services/ejabberd {
inherit (cfg) user;
inherit (pkgs) stdenv erlang ejabberd su;
};
in
{
name = "ejabberd";
job = "
description \"EJabberd server\"
stop on shutdown
respawn ${ejabberdService}/bin/control start
";
}