Skip to content
Snippets Groups Projects
Commit c8509bf2 authored by Marius Cramer's avatar Marius Cramer
Browse files

- allow partly configured autoinstall.ini

parent 6c1d2417
No related branches found
No related tags found
No related merge requests found
...@@ -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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment