forked from mirrors/nixpkgs
Added support for ejabberd virtualhosts
svn path=/nixos/trunk/; revision=12648
This commit is contained in:
parent
67b1b9af80
commit
545406b2e2
|
@ -1438,6 +1438,16 @@ in
|
|||
default = "/var/log/ejabberd";
|
||||
description = "Location of the logfile directory of ejabberd";
|
||||
};
|
||||
|
||||
confDir = mkOption {
|
||||
default = "/var/ejabberd";
|
||||
description = "Location of the config directory of ejabberd";
|
||||
};
|
||||
|
||||
virtualHosts = mkOption {
|
||||
default = "\"localhost\"";
|
||||
description = "Virtualhosts that ejabberd should host. Hostnames are surrounded with doublequotes and separated by commas";
|
||||
};
|
||||
};
|
||||
|
||||
jboss = {
|
||||
|
|
|
@ -22,9 +22,12 @@ in
|
|||
then
|
||||
cp -av ${pkgs.ejabberd}/var/lib/ejabberd /var/lib
|
||||
fi
|
||||
|
||||
mkdir -p ${cfg.confDir}
|
||||
sed -e 's|{hosts, \["localhost"\]}.|{hosts, \[${cfg.virtualHosts}\]}.|' ${pkgs.ejabberd}/etc/ejabberd/ejabberd.cfg > ${cfg.confDir}/ejabberd.cfg
|
||||
end script
|
||||
|
||||
respawn ${pkgs.bash}/bin/sh -c 'export PATH=$PATH:${pkgs.ejabberd}/sbin; cd ~; ejabberdctl --logs ${cfg.logsDir} --spool ${cfg.spoolDir} start; sleep 1d'
|
||||
respawn ${pkgs.bash}/bin/sh -c 'export PATH=$PATH:${pkgs.ejabberd}/sbin; cd ~; ejabberdctl --logs ${cfg.logsDir} --spool ${cfg.spoolDir} --config ${cfg.confDir}/ejabberd.cfg start; sleep 1d'
|
||||
|
||||
stop script
|
||||
${pkgs.ejabberd}/sbin/ejabberdctl stop
|
||||
|
|
Loading…
Reference in a new issue