diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 9ea79ba364..a3f5872f84 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -394,7 +394,7 @@ function quickShellSettings() __('Address'), html_print_input_text( 'gotty_addr', - $config['gotty_addr'], + ($config['gotty_addr'] ?? ''), '', 30, 100, @@ -443,9 +443,8 @@ function quickShellSettings() html_print_checkbox_switch( 'gotty_ssh_use_ssl', 1, - $config['gotty_ssh_use_ssl'], - true, - $disable_agentaccess + ($config['gotty_ssh_use_ssl'] ?? false), + true ) ); @@ -497,7 +496,7 @@ function quickShellSettings() html_print_checkbox_switch( 'gotty_telnet_use_ssl', 1, - $config['gotty_telnet_use_ssl'], + ($config['gotty_telnet_use_ssl'] ?? false), true ) ); diff --git a/pandora_console/include/functions_cron_task.php b/pandora_console/include/functions_cron_task.php index 09b34253e9..6c3d575dd0 100644 --- a/pandora_console/include/functions_cron_task.php +++ b/pandora_console/include/functions_cron_task.php @@ -504,7 +504,7 @@ function cron_task_start_gotty(bool $restart_mode=true) } } - if ($start_proc === true) { + if ($start_proc === true && file_exists('/usr/bin/pandora_gotty') === true) { $logFilePath = $config['homedir'].'/log/gotty_cron_tmp.log'; shell_exec('touch '.$logFilePath); @@ -527,7 +527,7 @@ function cron_task_start_gotty(bool $restart_mode=true) while ((time() - $startTime) < $maxWaitTime) { if ($start_proc === true) { // Read command output. - $log_content = file_get_contents($logFilePath); + $log_content = @file_get_contents($logFilePath); } if ($start_proc === true