diff --git a/pandora_console/ws.php b/pandora_console/ws.php index 063956afbd..35b3a7de09 100644 --- a/pandora_console/ws.php +++ b/pandora_console/ws.php @@ -112,7 +112,10 @@ if (substr($os, 0, 3) !== 'win') { } // Kill previous gotty running. - shell_exec('ps aux | grep "'.$config['gotty'].'" | grep -v grep | awk \'{print $2}\' | xargs kill -9 '); + $clean_cmd = 'ps aux | grep "'.$config['gotty'].'"'; + $clean_cmd .= '| grep -v grep | awk \'{print $2}\''; + $clean_cmd .= '| xargs kill -9 '; + shell_exec($clean_cmd); // Common. $base_cmd = 'nohup "'.$config['gotty'].'" '.$gotty_creds;