Commit 03200f17 authored by Florian Schaal's avatar Florian Schaal
Browse files

add amavis-configfile-location for centos 6.4; add amavis-initscrip-name for...

add amavis-configfile-location for centos 6.4; add amavis-initscrip-name for centos 6.4; fixed missing private_key in mail/mail_domain_dkim_create.php
parent d24bb483
......@@ -95,7 +95,7 @@ switch ($_POST['action']) {
exec('openssl rand -out /usr/local/ispconfig/server/temp/random-data.bin 4096', $output, $result);
exec('openssl genrsa -rand /usr/local/ispconfig/server/temp/random-data.bin 1024', $privkey, $result);
unlink("/usr/local/ispconfig/server/temp/random-data.bin");
$private_key='';
foreach($privkey as $values) $private_key=$private_key.$values."\n";
break;
case 'show': /* show the DNS-Record onLoad */
......
......@@ -77,7 +77,8 @@ class mail_plugin_dkim {
$pos_config=array(
'/etc/amavisd.conf',
'/etc/amavisd.conf/50-user',
'/etc/amavis/conf.d/50-user'
'/etc/amavis/conf.d/50-user',
'/etc/amavisd/amavisd.conf'
);
$amavis_configfile='';
foreach($pos_config as $conf) {
......@@ -123,13 +124,22 @@ class mail_plugin_dkim {
*/
function restart_amavis() {
global $app, $conf;
$initfile=$conf['init_scripts'].'/amavis';
$app->log('Restarting amavis.', LOGLEVEL_DEBUG);
exec(escapeshellarg($conf['init_scripts']).escapeshellarg('/amavis').' restart', $output);
$pos_init=array(
$conf['init_scripts'].'/amavis',
$conf['init_scripts'].'/amavisd'
);
$initfile='';
foreach($pos_init as $init) {
if (is_executable($init)) {
$initfile=$init;
break;
}
}
$app->log('Restarting amavis: '.$initfile.'.', LOGLEVEL_DEBUG);
exec(escapeshellarg($initfile).' restart', $output);
foreach($output as $logline) $app->log($logline, LOGLEVEL_DEBUG);
}
/**
* This function writes the keyfiles (public and private)
* @param string $key_file full path to the key-file
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment