]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
changed pathes for compatibility with Apache and Httpi
authorWWW daemon apache <wwwrun@jspc55.x-matter.uni-frankfurt.de>
Thu, 22 Aug 2013 14:32:21 +0000 (16:32 +0200)
committerWWW daemon apache <wwwrun@jspc55.x-matter.uni-frankfurt.de>
Thu, 22 Aug 2013 14:32:21 +0000 (16:32 +0200)
web/htdocs/tools/pwr/build_index.pl
web/htdocs/tools/pwr/pwr.conf
web/htdocs/tools/pwr/pwr.pl
web/htdocs/tools/pwr/read_conf.pl
web/htdocs/tools/pwr/save_conf.pl
web/httpi

index 76327bb2eea981cc0cd7b5b1401e60f27bb06e24..e0a10dbecf7fd6b6db9b9104fe8985ba41c0c7c7 100755 (executable)
@@ -1,11 +1,17 @@
 #!/usr/bin/perl -w
 use Cwd;
-#print "Content-type: text/html\n\n";
+print "Content-type: text/html\n\n";
 
 my $pwd = &Cwd::cwd();
 
+my $file = "pwr.conf";
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+  $file = "htdocs/tools/pwr/".$file;
+  }
 
-open(LESEN,"htdocs/tools/pwr/pwr.conf")
+
+
+open(LESEN,$file)
   or die "Fehler beim oeffnen von : $!\n";
 
 while(defined(my $i = <LESEN>)) {
index 504f78f4073a6761d04b86c35d51f4b2d0499e4c..0e8e681247b3b69ad91bf823876a0e6f32ab3d74 100644 (file)
@@ -1,6 +1,3 @@
 //PWRSPLY:/path/to/device:speed:Name:Type:Channels
 //type can be HMP, PSP, PST
-PWRSPLY:/dev/ttyUSB0:38400:HMP4030:HMP:3
-PWRSPLY:/dev/ttyUSB1:2400:PSP-405:PSP:1
-#PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3
-
+PWRSPLY:/dev/ttyUSB0:115200:HMP4030:HMP:3
index bf13e3e71941ce7ac2e2b839afd3ac9690cb0da4..ac0f4ebd7a165702b7d4e3228e08e5a0c92772ad 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-#print "Content-type: text/html\n\n";
+print "Content-type: text/html\n\n";
 
 
 use strict;
@@ -177,7 +177,7 @@ sub receive_answer_HMP {
         }
       }
     else {
-      usleep(50000);
+      usleep(40000);
       }
     }
   return $ret;
index 4293854e900a6dc6ec926b4cd01c9d545ebfe573..3b9f5a060b5edec074725b6da4c8d87a7bcd2fea 100755 (executable)
@@ -1,12 +1,17 @@
 #!/usr/bin/perl -w
-#print "Content-type: text/html\r\n\r\n";
+print "Content-type: text/html\r\n\r\n";
 
 use Cwd;
 
 my $pwd = &Cwd::cwd();
 
+my $file = "pwr.conf";
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+  $file = "htdocs/tools/pwr/".$file;
+  }
 
-open(LESEN,"htdocs/tools/pwr/pwr.conf")
+
+open(LESEN,$file)
   or print "Fehler beim oeffnen von : $!\n";
 
 while(defined(my $i = <LESEN>)) {
index 51d324c50f8b4db719f124a943cc71922f89ab7c..3834987883db1b5c6e2a85a6b97fb5e28d4373a9 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-
+print "Content-type: text/html\r\n\r\n";
 
 my $envstring = $ENV{'QUERY_STRING'};
 $envstring =~ s/%20/ /g;
@@ -7,7 +7,13 @@ $envstring =~ s/&/\n/g;
 ##$envstring =~ s/&/\n/g;
 
 
-open(SCHREIBEN,">htdocs/tools/pwr/pwr.conf")
+my $file = "pwr.conf";
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+  $file = "htdocs/tools/pwr/".$file;
+  }
+
+
+open(SCHREIBEN,">$file")
   or print "Fehler beim oeffnen von : $!\n";
 
 print SCHREIBEN $envstring;
index 6c52d6986dae13b07ccd97403dd17b794bec0342..1a26aeb6ed842ab4c93250ce9f1eaeb5191ea5b6 100755 (executable)
--- a/web/httpi
+++ b/web/httpi
@@ -431,7 +431,7 @@ exit;
 sub nsecmodel {
        &log;
        ($x,$x,$x,$x,$uid,$gid) = stat(S);
-       (!$uid || !$gid || $uid < 1000) &&
+       (!$uid || !$gid || $uid < 10) &&
                die "resource is root-owned, secured or not stat-able\n";
        if (!$<) {
                ($) = "$gid $gid") || die "can't set egid to $gid";