From 0fbdb18bbb9edb5b4683b254ca75abc30475a632 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 28 Jun 2017 17:14:38 +0200 Subject: [PATCH] Fixed #4678 Problems with autoinstaller (unattended setup) --- install/install.php | 6 +++++- install/update.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/install/install.php b/install/install.php index d0d1146bf9..3b54edd69c 100644 --- a/install/install.php +++ b/install/install.php @@ -114,7 +114,11 @@ if(isset($cmd_opt['autoinstall']) && is_file($cmd_opt['autoinstall'])) { if($path_parts['extension'] == 'php') { include_once $cmd_opt['autoinstall']; } elseif($path_parts['extension'] == 'ini') { - $tmp = ini_to_array(file_get_contents('autoinstall.ini')); + if(is_file('autoinstall.ini')) { + $tmp = ini_to_array(file_get_contents('autoinstall.ini')); + } else { + $tmp = ini_to_array(file_get_contents($cmd_opt['autoinstall'])); + } 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(); diff --git a/install/update.php b/install/update.php index ac052f8dd2..230fa4db80 100644 --- a/install/update.php +++ b/install/update.php @@ -119,7 +119,11 @@ if(isset($cmd_opt['autoinstall']) && is_file($cmd_opt['autoinstall'])) { if($path_parts['extension'] == 'php') { include_once $cmd_opt['autoinstall']; } elseif($path_parts['extension'] == 'ini') { - $tmp = ini_to_array(file_get_contents('autoinstall.ini')); + if(is_file('autoinstall.ini')) { + $tmp = ini_to_array(file_get_contents('autoinstall.ini')); + } else { + $tmp = ini_to_array(file_get_contents($cmd_opt['autoinstall'])); + } 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(); -- GitLab