Commit b8ff9fd8 authored by Marius Burkard's avatar Marius Burkard

- for LE reload is not enough, we need force-reload

parent 5bf8a0ff
......@@ -45,19 +45,19 @@ class cronjob_letsencrypt extends cronjob {
$version = $matches[2];
if(($type != 'letsencrypt' && $type != 'certbot') || version_compare($version, '0.7.0', '<')) {
exec($letsencrypt . ' -n renew');
$app->services->restartServiceDelayed('httpd', 'reload');
$app->services->restartServiceDelayed('httpd', 'force-reload');
} else {
$marker_file = '/usr/local/ispconfig/server/le.restart';
$cmd = "echo '1' > " . $marker_file;
exec($letsencrypt . ' -n renew --post-hook ' . escapeshellarg($cmd));
if(file_exists($marker_file) && trim(file_get_contents($marker_file)) == '1') {
unlink($marker_file);
$app->services->restartServiceDelayed('httpd', 'reload');
$app->services->restartServiceDelayed('httpd', 'force-reload');
}
}
} else {
exec($letsencrypt . ' -n renew');
$app->services->restartServiceDelayed('httpd', 'reload');
$app->services->restartServiceDelayed('httpd', 'force-reload');
}
}
......
......@@ -213,6 +213,8 @@ class web_module {
$retval = array('output' => '', 'retval' => 0);
if($action == 'restart') {
$cmd = $app->system->getinitcommand($daemon, 'restart');
} elseif($action == 'force-reload') {
$cmd = $app->system->getinitcommand($daemon, 'force-reload');
} else {
$cmd = $app->system->getinitcommand($daemon, 'reload');
}
......
Markdown is supported
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