$hostname, 'Extension' => $extension, ]; $json = json_encode($result, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); $answer = PostJson("$bdnuss/Storage/SVC/VOLUME/SVC_VOLUME_DELETE.php", $json); $rc = (int)json_decode($answer, true)['RC'] ?? 1; $stdout = json_decode($answer, true)['Msg'] ?? 'Unknown error'; if ($rc === 0) {$done = 1;} $result = [ 'RC' => $rc, 'StdOut' => $stdout, ]; $json = json_encode($result, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); }else{ $result = [ 'RC' => 1, 'StdOut' => "Invalid LUN format", ]; $json = json_encode($result, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); } // Send Answer echo $json; // Log to dedicated Table log2DB();