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:
Michael Raskin 2008-03-03 19:28:10 +00:00
parent 16a8462820
commit c0dd88a973
3 changed files with 48 additions and 0 deletions

View File

@ -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.
";
};
};
};

View File

@ -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 {

28
upstart-jobs/openfire.nix Normal file
View File

@ -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
'';
}