Skip to content
Snippets Groups Projects
Commit 7c67b8e5 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'reconfigure-incron-if-php-version-changes' into 'stable-3.1'

Reconfigure incron if the PHP version changes

See merge request ispconfig/ispconfig3!983
parents 52019c54 c9145d36
No related branches found
No related tags found
No related merge requests found
...@@ -45,8 +45,8 @@ class z_php_fpm_incron_reload_plugin { ...@@ -45,8 +45,8 @@ class z_php_fpm_incron_reload_plugin {
function incronUpdate($eventName, $data) { function incronUpdate($eventName, $data) {
global $app; global $app;
if ($data['new']['document_root'] === $data['old']['document_root']) { if ($this->documentRootUnchanged($data) && $this->phpVersionUnchanged($data)) {
$app->log('Document root unchanged. Not updating incron configuration.', LOGLEVEL_DEBUG); $app->log('Document root and PHP version unchanged. Not updating incron configuration.', LOGLEVEL_DEBUG);
return; return;
} }
...@@ -59,6 +59,16 @@ class z_php_fpm_incron_reload_plugin { ...@@ -59,6 +59,16 @@ class z_php_fpm_incron_reload_plugin {
$this->teardown($data['old']); $this->teardown($data['old']);
} }
private function documentRootUnchanged($data)
{
return $data['new']['document_root'] === $data['old']['document_root'];
}
private function phpVersionUnchanged($data)
{
return $data['new']['fastcgi_php_version'] === $data['old']['fastcgi_php_version'];
}
private function setup($data) private function setup($data)
{ {
$triggerFile = $this->getTriggerFilePath($data['document_root']); $triggerFile = $this->getTriggerFilePath($data['document_root']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment