Added ejabberd to the systemPackages and fixed some command line arguments. This will make the ejabberd service working again
svn path=/nixos/trunk/; revision=18070
This commit is contained in:
parent
8c5b200164
commit
46558b31a0
@ -49,6 +49,7 @@ in
|
|||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.ejabberd ];
|
||||||
|
|
||||||
jobs.ejabberd =
|
jobs.ejabberd =
|
||||||
{ description = "EJabberd server";
|
{ description = "EJabberd server";
|
||||||
@ -65,12 +66,16 @@ in
|
|||||||
then
|
then
|
||||||
cp -av ${pkgs.ejabberd}/var/lib/ejabberd /var/lib
|
cp -av ${pkgs.ejabberd}/var/lib/ejabberd /var/lib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p ${cfg.confDir}
|
if ! test -d ${cfg.confDir}
|
||||||
test -f ${cfg.confDir}/ejabberd.cfg || sed -e 's|{hosts, \["localhost"\]}.|{hosts, \[${cfg.virtualHosts}\]}.|' ${pkgs.ejabberd}/etc/ejabberd/ejabberd.cfg > ${cfg.confDir}/ejabberd.cfg
|
then
|
||||||
|
mkdir -p ${cfg.confDir}
|
||||||
|
cp ${pkgs.ejabberd}/etc/ejabberd/* ${cfg.confDir}
|
||||||
|
sed -e 's|{hosts, \["localhost"\]}.|{hosts, \[${cfg.virtualHosts}\]}.|' ${pkgs.ejabberd}/etc/ejabberd/ejabberd.cfg > ${cfg.confDir}/ejabberd.cfg
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exec = "${pkgs.bash}/bin/sh -c 'export PATH=$PATH:${pkgs.ejabberd}/sbin:${pkgs.coreutils}/bin:${pkgs.bash}/bin; cd ~; ejabberdctl --logs ${cfg.logsDir} --spool ${cfg.spoolDir} --config ${cfg.confDir}/ejabberd.cfg start; sleep 1d'";
|
exec = "${pkgs.bash}/bin/sh -c 'export PATH=$PATH:${pkgs.ejabberd}/sbin:${pkgs.coreutils}/bin:${pkgs.bash}/bin; ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} start; sleep 1d'";
|
||||||
|
|
||||||
postStop =
|
postStop =
|
||||||
''
|
''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user