diff --git a/htdocs/index.php b/htdocs/index.php index 816e92e..ed2524c 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -4,8 +4,7 @@ spl_autoload_register(function ($class) { if (file_exists("lib/$class.php")) { require_once("lib/$class.php"); } }); -Config::load('../config/config.ini'); - +Config::load(); Logger::init(); MailNotify::init(); diff --git a/htdocs/lib/Config.php b/htdocs/lib/Config.php index 5b172af..fb9773f 100644 --- a/htdocs/lib/Config.php +++ b/htdocs/lib/Config.php @@ -2,7 +2,8 @@ class Config { private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array(); - public static function load($file) { + public static function load() { + $file = getenv("EVOADMINMAIL_CONFIG_FILE") or $file = '../config/config.ini'; $ini = parse_ini_file($file, true); self::$name = $ini['global']['name']; self::$mail = $ini['global']['mail'];