create dummy pool-config whenever a fpm-daemons configdir is empty so it still restarts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -435,6 +435,27 @@ class phpinterface_fpm
|
||||
return $configdir;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a dummy fpm pool config with minimal configuration
|
||||
* (this is used whenever a config directory is empty but needs at least one pool to startup/restart)
|
||||
*
|
||||
* @param string $configdir
|
||||
*/
|
||||
public static function createDummyPool($configdir)
|
||||
{
|
||||
if (! is_dir($configdir)) {
|
||||
safe_exec('mkdir -p ' . escapeshellarg($configdir));
|
||||
}
|
||||
$config = makeCorrectFile($configdir . '/dummy.conf');
|
||||
$dummy = "[dummy]
|
||||
user = ".Settings::Get('system.httpuser')."
|
||||
listen = /run/" . base64_encode($configdir) . "-fpm.sock
|
||||
pm = static
|
||||
pm.max_children = 1
|
||||
";
|
||||
file_put_contents($config, $dummy);
|
||||
}
|
||||
|
||||
/**
|
||||
* return the admin-data of a specific admin
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user