Added directory option for ejabberd dumps so that we can use derivations on a convenient way, e.g. loadDumps = [ myDumpDrvFun ];
svn path=/nixos/branches/upstart-0.6/; revision=18487
This commit is contained in:
parent
dd0f8b36d5
commit
ebbde6f8d3
|
@ -108,7 +108,17 @@ in
|
|||
${concatMapStrings (dump:
|
||||
''
|
||||
echo "Importing dump: ${dump}"
|
||||
ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} load ${dump}
|
||||
|
||||
if [ -f ${dump} ]
|
||||
then
|
||||
ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} load ${dump}
|
||||
elif [ -d ${dump} ]
|
||||
then
|
||||
for i in ${dump}/ejabberd-dump/*
|
||||
do
|
||||
ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} load $i
|
||||
done
|
||||
fi
|
||||
'') cfg.loadDumps}
|
||||
fi
|
||||
''}
|
||||
|
|
Loading…
Reference in New Issue