diff --git a/emhttp/plugins/dynamix/include/InstallKey.php b/emhttp/plugins/dynamix/include/InstallKey.php index 7f08e760d..6e4f9bf9a 100644 --- a/emhttp/plugins/dynamix/include/InstallKey.php +++ b/emhttp/plugins/dynamix/include/InstallKey.php @@ -60,16 +60,11 @@ class KeyInstaller exec("/usr/bin/wget -q -O " . escapeshellarg("/boot/config/$keyFile") . " " . escapeshellarg($url), $output, $returnVar); if ($returnVar === 0) { - exec("emcmd \"checkRegistration=Apply\""); - $var = (array)@parse_ini_file('/var/local/emhttp/var.ini'); - if (_var($var, 'mdState') == "STARTED") { - return $this->responseComplete(200, [ - 'status' => 'success', - 'message' => _('Please Stop array to complete key installation'), - ]); - } else { - return $this->responseComplete(200, ['status' => 'success']); - } + exec('emcmd '.escapeshellarg('checkRegistration=Apply')); + return $this->responseComplete(200, [ + 'status' => 'success', + 'message' => _('Key installed'), + ]); } else { @unlink(escapeshellarg("/boot/config/$keyFile")); return $this->responseComplete(406, ['error' => _('download error') . " $returnVar"]); diff --git a/emhttp/plugins/dynamix/scripts/install_key b/emhttp/plugins/dynamix/scripts/install_key index b8c0e8534..695fc510a 100755 --- a/emhttp/plugins/dynamix/scripts/install_key +++ b/emhttp/plugins/dynamix/scripts/install_key @@ -34,12 +34,8 @@ if (in_array($host,['keys.lime-technology.com','lime-technology.com'])) { write("Downloading $keyfile ...\n"); exec("/usr/bin/wget -q -O ".escapeshellarg("/boot/config/$key_file")." ".escapeshellarg($url), $output, $return_var); if ($return_var === 0) { - exec("emcmd \"checkRegistration=Apply\""); - if (parse_ini_file('/var/local/emhttp/var.ini')['mdState'] == 'STARTED') { - write("Installing ... Please Stop array to complete key installation.\n"); - } else { - write("Installed ...\n"); - } + exec('emcmd '.escapeshellarg('checkRegistration=Apply')); + write("Key installed ...\n"); } else { write("ERROR: $return_var\n"); switch($return_var) {