mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
plugin installation in docker
This commit is contained in:
26
docker/phraseanet/plugins/SubCommand.php
Normal file
26
docker/phraseanet/plugins/SubCommand.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Docker\Plugins\Command;
|
||||
|
||||
function setupStreaming()
|
||||
{
|
||||
ini_set('output_buffering', 'off');
|
||||
ini_set('zlib.output_compression', false);
|
||||
if (function_exists('apache_setenv')) {
|
||||
apache_setenv('no-gzip', '1');
|
||||
apache_setenv('dont-vary', '1');
|
||||
}
|
||||
}
|
||||
|
||||
setupStreaming();
|
||||
|
||||
abstract class SubCommand
|
||||
{
|
||||
static public function run($cmd)
|
||||
{
|
||||
system($cmd, $return);
|
||||
if (0 !== $return) {
|
||||
throw new \Exception(sprintf('Error %d: %s', $return, $cmd));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user