mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
allow to set all post_install parameters via environment EGW_*
Parameter: --ldap_base --> EGW_LDAP_BASE (/ and - are converted to _)
This commit is contained in:
parent
07d698cbc4
commit
53c3dc2e35
@ -185,6 +185,15 @@ function set_distro_defaults($distro=null)
|
||||
}
|
||||
set_distro_defaults();
|
||||
|
||||
// read EGW_* environment variables overwriting default config above allowing to set all parameters via environment
|
||||
foreach($config as $name => $value)
|
||||
{
|
||||
if (isset($_SERVER[$env='EGW_'.strtoupper(strtr($name, ['-'=>'_','/'=>'_']))]) && $_SERVER[$env] !== $value)
|
||||
{
|
||||
$config[$name] = $_SERVER[$env];
|
||||
}
|
||||
}
|
||||
|
||||
// read config from command line
|
||||
$argv = str_replace(array("''", '""'), '', $_SERVER['argv']);
|
||||
$prog = array_shift($argv);
|
||||
|
Loading…
Reference in New Issue
Block a user