Added openfire upstart job. Note: after enabling it first time, go 127.0.0.1:9090 to configure it!
svn path=/nixos/trunk/; revision=10930
This commit is contained in:
parent
16a8462820
commit
c0dd88a973
|
@ -1744,6 +1744,20 @@
|
|||
};
|
||||
};
|
||||
|
||||
openfire = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
Whether to enable OpenFire XMPP server.
|
||||
";
|
||||
};
|
||||
usePostgreSQL = mkOption {
|
||||
default = true;
|
||||
description = "
|
||||
Whether you use PostgreSQL service for your storage back-end.
|
||||
";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -187,6 +187,12 @@ let
|
|||
inherit config pkgs;
|
||||
})
|
||||
|
||||
# OpenFire XMPP server
|
||||
++ optional config.services.openfire.enable
|
||||
(import ../upstart-jobs/openfire.nix {
|
||||
inherit config pkgs;
|
||||
})
|
||||
|
||||
# JBoss service
|
||||
++ optional config.services.jboss.enable
|
||||
(import ../upstart-jobs/jboss.nix {
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
{pkgs, config}:
|
||||
|
||||
assert config.services.openfire.usePostgreSQL -> config.services.postgresql.enable;
|
||||
let
|
||||
startDependency = if config.services.openfire.usePostgreSQL then
|
||||
"postgresql"
|
||||
else
|
||||
if config.services.gw6c.enable then
|
||||
"gw6c"
|
||||
else
|
||||
"network-interfaces";
|
||||
in
|
||||
with pkgs;
|
||||
{
|
||||
name = "openfire";
|
||||
job = ''
|
||||
description "OpenFire XMPP server"
|
||||
|
||||
start on ${startDependency}/started
|
||||
stop on shutdown
|
||||
|
||||
script
|
||||
export PATH=${jre}/bin:${openfire}/bin:${coreutils}/bin:${which}/bin:${gnugrep}/bin:${gawk}/bin:${gnused}/bin
|
||||
export HOME=/tmp
|
||||
openfire start
|
||||
end script
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue