3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/upstart-jobs/openfire.nix
2008-03-03 19:28:10 +00:00

29 lines
635 B
Nix

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