diff --git a/www-sq7br/conf.php b/www-sq7br/conf.php
index a71798d..719ed94 100644
--- a/www-sq7br/conf.php
+++ b/www-sq7br/conf.php
@@ -3,11 +3,17 @@
if (array_key_exists("config",$_POST)){
file_put_contents("conf/dxl_config.sh",str_replace("\r\n","\n",$_POST["config"]));
}
-
+if (array_key_exists("restart",$_POST)){
+ touch("/tmp/restart_dxl");
+}
print("
");
+print("");
+@print(file_get_contents("/tmp/restart_log"));
+print("
");
?>
\ No newline at end of file
diff --git a/www-sq7br/display.php b/www-sq7br/display.php
new file mode 100644
index 0000000..f2bb02a
--- /dev/null
+++ b/www-sq7br/display.php
@@ -0,0 +1,32 @@
+\n");
+$sondes=array();
+$lines=@file("/tmp/sonde.csv");
+if ($lines) {
+ foreach($lines as $line) $sondes[]=explode(";",$line);
+
+ //sort by altitude, descending
+ usort($sondes, function($a, $b) {
+ return $b[3] - $a[3];
+ });
+
+ //print actual low or lowest
+ foreach($sondes as $l) {
+ if ( ($l[8]+60 > time()) && (((int)$l[3]) < 3000) ){
+ break;
+ }
+ }
+ print($l[0]." ".$l[7]."\n");
+ print($l[1]." ".$l[2]."\n");
+ print($l[3]."m ".$l[5]."m/s\n");
+}else {
+ print("---\n");
+ print("---\n");
+ print("---\n");
+}
+ print("\n");
+ print("\n");
+
+print("\n");
+
+?>
\ No newline at end of file
diff --git a/www-sq7br/index.php b/www-sq7br/index.php
index 53b70b7..f5804d0 100644
--- a/www-sq7br/index.php
+++ b/www-sq7br/index.php
@@ -17,7 +17,7 @@ print("spdxl ".$realIP."");
if($p=='s') echo "var page='sondy.php';";
if($p=='A') echo "var page='wf.php';";
if($p=='PS') echo "var page='processes.php';";
-
+ if($p=='D') echo "var page='display.php';";
?>
function getData(){
@@ -70,6 +70,7 @@ function getData(){
+
@@ -79,7 +80,7 @@ function getData(){
if ($p=="C") require("conf.php");
-if($p=='0' || $p=='' || $p=='s' ) echo "";
+if($p=='0' || $p=='' || $p=='s' || $p=='D' ) echo "";
if( substr($p,0,6)=="SDRTST" ) include 'sdr.php';
if($p=='A') echo "";
if($p=='PS') echo "";
diff --git a/www-sq7br/processes.php b/www-sq7br/processes.php
index 3c57d6e..802986c 100644
--- a/www-sq7br/processes.php
+++ b/www-sq7br/processes.php
@@ -1,28 +1,19 @@
-
-
-
- Name | PID |
";
-procesRunningPrint("rtl_tcp");
-echo "";
-echo "";
-procesRunningPrint("sdrtst");
-echo "
";
-echo "";
-procesRunningPrint("sondeudp");
-echo "
";
-echo "";
-procesRunningPrint("sondemod");
-echo "
";
-echo "";
-procesRunningPrint("udpgate4");
-echo "
";
+ print("");
+ print("RUNNING:\n");
+ $required=array("rtl_tcp","sdrtst","sondeudp","sondemod","udpgate4");
+ $procs=array();
+ exec("ps -C ".implode(",",$required)." -o cmd --noheaders",$procs);
+ foreach($procs as $proc){
+ $p=explode(" ",$proc,2);
+ $cmd=basename($p[0]);
+ print($cmd.":\n".$p[1]."\n");
+ $required=array_diff($required,array($cmd));
+ }
+ print("\nABSENT:\n");
+ foreach($required as $cmd){
+ print($cmd."\n");
+ }
+ print("
");
-
-?>
-
-
-
+?>
\ No newline at end of file