In '/usr/local/lxlabs/kloxo/pscript/fixdomainkey' and '/script/fixdomainkey', change content to:
#!/bin/sh
. /script/directory
lxphp.exe ../bin/fix/domainkey.php $*
In '/usr/local/lxlabs/kloxo/bin/fix/domainkey.php', change content to:
<?php
include_once "htmllib/lib/include.php";
initProgram('admin');
$server = (isset($list['server'])) ? $list['server'] : 'localhost';
$client = (isset($list['client'])) ? $list['client'] : null;
$domain = (isset($list['domain'])) ? $list['domain'] : null;
$nolog = (isset($list['nolog'])) ? $list['nolog'] : null;
$login->loadAllObjects('client');
$list = $login->getList('client');
foreach($list as $c) {
if ($client) {
$ca = explode(",", $client);
if (!in_array($c->nname, $ca)) { continue; }
$server = 'all';
}
if ($server !== 'all') {
$sa = explode(",", $server);
if (!in_array($c->syncserver, $sa)) { continue; }
}
$dlist = $c->getList('domaina');
foreach((array) $dlist as $l) {
if ($domain) {
$da = explode(",", $domain);
if (!in_array($web->nname, $da)) { continue; }
}
$l->generateDomainKey(false);
}
}
- it's work for certain servers, clients and domains
- for multiple select, you can set as 'sh /script/fixdomainkeys --client=admin,client1'