domain-options on domain.add do not work

This commit is contained in:
Peter Hormanns 2013-01-30 18:04:17 +01:00
parent f8fd8709d5
commit dcd2eadd05

View File

@ -83,7 +83,12 @@ if (pacs.length == 1 && hive != 'undef') {
// Domain
var domains = domain.search();
for (idx=0; idx<domains.length; idx++) {
if (domains[idx]['name'] == pacname + '.hostsharing.net') {
if ( ! (domains[idx]['name'] == pacname + '.hostsharing.net')) {
file.write('domain.add({set:{\n');
file.write('name: "' + domains[idx]['name'] + '",\n');
file.write('user: "' + domains[idx]['user'] + '"\n');
file.write('}});\n');
}
file.write('domain.update({where:{\n');
file.write('name: "' + domains[idx]['name'] + '"\n');
file.write('},set:{\n');
@ -95,19 +100,6 @@ if (pacs.length == 1 && hive != 'undef') {
}
file.write(' ]\n');
file.write('}});\n');
} else {
file.write('domain.add({set:{\n');
file.write('name: "' + domains[idx]['name'] + '",\n');
file.write('user: "' + domains[idx]['user'] + '",\n');
file.write('domainoptions: [\n');
if (domains[idx]['domainoptions']) {
for (jdx=0; jdx<domains[idx]['domainoptions'].length; jdx++) {
file.write(' "' + domains[idx]['domainoptions'][jdx] + '",\n');
}
}
file.write(' ]\n');
file.write('}});\n');
}
}
// Alias
var aliases = emailalias.search();