Would you like to START A PROCESS ?";
}
else{
$date_now = date('dmY\.his');
$nbli = exec("ps aux | grep rtest.sh | grep -v grep | grep -v 'vi rtest.sh' | wc -l");
if ($nbli === "0"){
echo shell_exec("nohup bash $rtest_location $package_to_test -r \"$package_to_test_repo\" -l $rlib_location -m $email_addr -u \"".$base_url."view.php?check=check_".$package_to_test."_".$date_now."\" -x $xvfbrun_location -n $nb_threads -d ".$all_results_dir."/check_".$package_to_test."_".$date_now." > ".$all_results_dir.$date_now.".log 2>&1 & echo $!");
echo "Process started
";
echo "nohup bash $rtest_location $package_to_test -r \"$package_to_test_repo\" -l $rlib_location -m $email_addr -u \"".$base_url."view.php?check=check_".$package_to_test."_".$date_now."\" -x $xvfbrun_location -n $nb_threads -d ".$all_results_dir."check_".$package_to_test."_".$date_now." > ".$all_results_dir.$date_now.".log 2>&1 & echo $!
";
echo " VIEW REAL TIME RESULTS
";
echo " KILL THE PROCESS";
}
else{
echo "PROCESS ALREADY RUNNING.
KILL THE PROCESS
";
}
}
?>