if(!$debug)exec('camogm /var/state/camogm_cmd > /dev/null 2>&1 &');// "> /dev/null 2>&1 &" makes sure it is really really run as a background job that does not wait for input
if(!$debug)exec($start_str.' > /dev/null 2>&1 &');// "> /dev/null 2>&1 &" makes sure it is really really run as a background job that does not wait for input
elseexec($start_str.$debug.' 2>&1 &');
for($i=0;$i<5;$i++){
if(is_file("/var/state/camogm.state"))break;
...
...
@@ -100,7 +103,7 @@ if ($cmd == "run_camogm")
}
if($debug){
$cmd_pipe="/var/state/camogm_cmd";
// $cmd_pipe = "/var/state/camogm_cmd";
$fcmd=fopen($cmd_pipe,"w");
fprintf($fcmd,"debuglev=$debuglev");
}
...
...
@@ -109,7 +112,7 @@ if ($cmd == "run_camogm")
elseif($cmd=="status")
{
$pipe="/var/state/camogm.state";
$cmd_pipe="/var/state/camogm_cmd";
// $cmd_pipe="/var/state/camogm_cmd";
$mode=0777;
if(!file_exists($pipe)){
umask(0);
...
...
@@ -139,7 +142,7 @@ else if ($cmd == "run_status")