don't remove php-fpm-configs after they have been created, the cron_tasks.php cleans up the directory already
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
This commit is contained in:
@@ -1038,37 +1038,6 @@ class nginx
|
||||
}
|
||||
}
|
||||
}
|
||||
if($this->settings['phpfpm']['enabled'] == '1')
|
||||
{
|
||||
foreach($this->known_vhostfilenames as $vhostfilename){
|
||||
$known_phpfpm_files[]=preg_replace('/^(05|10|20|21|22|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_/', '', $vhostfilename);
|
||||
}
|
||||
|
||||
$configdir = $this->settings['phpfpm']['configdir'];
|
||||
$phpfpm_file_dirhandle = opendir($this->settings['phpfpm']['configdir']);
|
||||
|
||||
if ($phpfpm_file_dirhandle !== false) {
|
||||
|
||||
while (false !== ($phpfpm_filename = readdir($phpfpm_file_dirhandle))) {
|
||||
|
||||
if (is_array($known_phpfpm_files)
|
||||
&& $phpfpm_filename != '.'
|
||||
&& $phpfpm_filename != '..'
|
||||
&& !in_array($phpfpm_filename, $known_phpfpm_files)
|
||||
&& file_exists(makeCorrectFile($this->settings['phpfpm']['configdir'] . '/' . $phpfpm_filename))
|
||||
) {
|
||||
fwrite($this->debugHandler, ' nginx::wipeOutOldVhostConfigs: unlinking PHP5-FPM ' . $phpfpm_filename . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . $phpfpm_filename);
|
||||
unlink(makeCorrectFile($this->settings['phpfpm']['configdir'] . '/' . $phpfpm_filename));
|
||||
}
|
||||
if (!is_array($known_phpfpm_files)) {
|
||||
$this->logger->logAction(CRON_ACTION, LOG_WARNING, "WARNING!! PHP-FPM Configs Not written!!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->logger->logAction(CRON_ACTION, LOG_WARNING, "WARNING!! PHP-FPM configuration path could not be read (".$this->settings['phpfpm']['configdir'].")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user