don't remove php-fpm-configs after they have been
created, the cron_tasks.php cleans up the directory already *update -> also in apache2 and lighttpd cron* Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
This commit is contained in:
@@ -1323,37 +1323,6 @@ class apache
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($this->settings['phpfpm']['enabled'] == '1')
|
|
||||||
{
|
|
||||||
foreach($this->virtualhosts_data as $vhosts_filename => $vhosts_file)
|
|
||||||
{
|
|
||||||
$this->known_vhostfilenames[] = basename($vhosts_filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
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($phpfpm_filename != '.'
|
|
||||||
&& $phpfpm_filename != '..'
|
|
||||||
&& !in_array($phpfpm_filename, $known_phpfpm_files)
|
|
||||||
&& file_exists(makeCorrectFile($this->settings['phpfpm']['configdir'] . '/' . $phpfpm_filename)))
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' apache::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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_WARNING, "WARNING!! PHP-FPM configuration path could not be read (".$this->settings['phpfpm']['configdir'].")");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1030,36 +1030,5 @@ class lighttpd
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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, ' lighttpd::wipeOutOldConfigs: 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