Commit 07ce955c authored by Florian Schaal's avatar Florian Schaal

Merge branch 'stable-3.1' of http://git.ispconfig.org/ispconfig/ispconfig3 into stable-3.1

parents a5c95e38 0064d598
......@@ -86,6 +86,8 @@ class page_action extends tform_actions {
function onSubmit() {
global $app, $conf;
if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
// Check the client limits, if user is not the admin
if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin
// Get the limits of the client
......
......@@ -85,6 +85,8 @@ class page_action extends tform_actions {
function onSubmit() {
global $app, $conf;
if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1);
// Check the client limits, if user is not the admin
if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin
// Get the limits of the client
......
......@@ -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