Commit d5039211 authored by Mikhail Karpenko's avatar Mikhail Karpenko

Change state file assignment

parent f0587888
...@@ -74,6 +74,7 @@ $cmd_pipe = "/var/state/camogm_cmd"; ...@@ -74,6 +74,7 @@ $cmd_pipe = "/var/state/camogm_cmd";
$cmd_state = "/var/state/camogm.state"; $cmd_state = "/var/state/camogm.state";
$cmd_port = "3456"; $cmd_port = "3456";
$default_state = "/home/root/camogm.disk"; $default_state = "/home/root/camogm.disk";
$state_file = "/mnt/sda1/camogm.disk";
$start_str = "camogm -n " . $cmd_pipe . " -p " . $cmd_port; $start_str = "camogm -n " . $cmd_pipe . " -p " . $cmd_port;
if ($cmd == "run_camogm") if ($cmd == "run_camogm")
...@@ -88,7 +89,11 @@ if ($cmd == "run_camogm") ...@@ -88,7 +89,11 @@ if ($cmd == "run_camogm")
$p = (array_filter($arr, "low_daemon")); $p = (array_filter($arr, "low_daemon"));
$check = implode("<br />",$p); $check = implode("<br />",$p);
$state_file = get_state_path(); //$state_file = get_state_path();
if (isset($_GET['state_file'])){
$state_file = $_GET['state_file'];
}
$start_str = $start_str . " -s " . $state_file; $start_str = $start_str . " -s " . $state_file;
if (strstr($check, $start_str)) if (strstr($check, $start_str))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment