Commit c8509bf2 authored by Marius Cramer's avatar Marius Cramer

- allow partly configured autoinstall.ini

parent 6c1d2417
...@@ -115,6 +115,10 @@ if(isset($cmd_opt['autoinstall']) && is_file($cmd_opt['autoinstall'])) { ...@@ -115,6 +115,10 @@ if(isset($cmd_opt['autoinstall']) && is_file($cmd_opt['autoinstall'])) {
include_once $cmd_opt['autoinstall']; include_once $cmd_opt['autoinstall'];
} elseif($path_parts['extension'] == 'ini') { } elseif($path_parts['extension'] == 'ini') {
$tmp = ini_to_array(file_get_contents('autoinstall.ini')); $tmp = ini_to_array(file_get_contents('autoinstall.ini'));
if(!is_array($tmp['install'])) $tmp['install'] = array();
if(!is_array($tmp['ssl_cert'])) $tmp['ssl_cert'] = array();
if(!is_array($tmp['expert'])) $tmp['expert'] = array();
if(!is_array($tmp['update'])) $tmp['update'] = array();
$autoinstall = $tmp['install'] + $tmp['ssl_cert'] + $tmp['expert'] + $tmp['update']; $autoinstall = $tmp['install'] + $tmp['ssl_cert'] + $tmp['expert'] + $tmp['update'];
unset($tmp); unset($tmp);
} }
......
...@@ -120,6 +120,10 @@ if(isset($cmd_opt['autoinstall']) && is_file($cmd_opt['autoinstall'])) { ...@@ -120,6 +120,10 @@ if(isset($cmd_opt['autoinstall']) && is_file($cmd_opt['autoinstall'])) {
include_once $cmd_opt['autoinstall']; include_once $cmd_opt['autoinstall'];
} elseif($path_parts['extension'] == 'ini') { } elseif($path_parts['extension'] == 'ini') {
$tmp = ini_to_array(file_get_contents('autoinstall.ini')); $tmp = ini_to_array(file_get_contents('autoinstall.ini'));
if(!is_array($tmp['install'])) $tmp['install'] = array();
if(!is_array($tmp['ssl_cert'])) $tmp['ssl_cert'] = array();
if(!is_array($tmp['expert'])) $tmp['expert'] = array();
if(!is_array($tmp['update'])) $tmp['update'] = array();
$autoinstall = $tmp['install'] + $tmp['ssl_cert'] + $tmp['expert'] + $tmp['update']; $autoinstall = $tmp['install'] + $tmp['ssl_cert'] + $tmp['expert'] + $tmp['update'];
unset($tmp); unset($tmp);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment