Added ejabberd service
svn path=/nixos/trunk/; revision=10495
This commit is contained in:
parent
707e515f82
commit
90f34e204d
@ -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;
|
||||
|
@ -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
22
upstart-jobs/ejabberd.nix
Normal 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
|
||||
";
|
||||
}
|
Loading…
Reference in New Issue
Block a user