Aenderungen am VPN Watch
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 14 Jul 2007 09:52:29 +0000 (09:52 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 14 Jul 2007 09:52:29 +0000 (09:52 +0000)
Language Einstellungen in der Graph.pl

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@683 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/cfgroot/graphs.pl
doc/language_issues.de
doc/language_issues.en
html/cgi-bin/redirect.cgi [new file with mode: 0644]
src/scripts/vpn-watch

index 0ac9e7d..99beaf7 100644 (file)
@@ -1,5 +1,5 @@
 # Generate Graphs exported from Makegraphs to minimize system load an only generate the Graphs when displayed
-# Initialisation
+# This is part of the IPFire Firewall
 
 package Graphs;
 
@@ -10,9 +10,6 @@ require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
-$General::version = '2.0b';
-$General::swroot = '/var/ipfire';
-
 my $ERROR;
 my $rrdlog = "/var/log/rrd";
 my $graphs = "/srv/web/ipfire/html/graphs";
@@ -59,7 +56,7 @@ sub updatecpugraph {
         "--color", "SHADEA".$color{"color19"},
         "--color", "SHADEB".$color{"color19"},
         "--color", "BACK".$color{"color21"},
-        "-t $tr{'cpu usage per'} $tr{$period}",
+        "-t $Lang::tr{'cpu usage per'} $Lang::tr{$period}",
         "DEF:iowait=$rrdlog/cpu.rrd:iowait:AVERAGE",
         "DEF:user=$rrdlog/cpu.rrd:user:AVERAGE",
         "DEF:system=$rrdlog/cpu.rrd:system:AVERAGE",
@@ -71,32 +68,32 @@ sub updatecpugraph {
         "CDEF:idlepct=100,idle,total,/,*",
         "CDEF:iowaitpct=100,iowait,total,/,*",
         "CDEF:irqpct=100,irq,total,/,*",
-        "COMMENT:$tr{'caption'}\\t\\t\\t   ",
-        "COMMENT:$tr{'maximal'}",
-        "COMMENT:$tr{'average'}",
-        "COMMENT:$tr{'minimal'}",
-        "COMMENT:$tr{'current'}\\j",
-        "AREA:iowaitpct".$color{"color14"}.":$tr{'iowait'}",
+        "COMMENT:$Lang::tr{'caption'}\\t\\t\\t   ",
+        "COMMENT:$Lang::tr{'maximal'}",
+        "COMMENT:$Lang::tr{'average'}",
+        "COMMENT:$Lang::tr{'minimal'}",
+        "COMMENT:$Lang::tr{'current'}\\j",
+        "AREA:iowaitpct".$color{"color14"}.":$Lang::tr{'iowait'}",
         "GPRINT:iowaitpct:MAX:%3.2lf%%",
         "GPRINT:iowaitpct:AVERAGE:%3.2lf%%",
         "GPRINT:iowaitpct:MIN:%3.2lf%%",
         "GPRINT:iowaitpct:LAST:%3.2lf%%\\j",
-        "STACK:irqpct".$color{"color23"}.":IRQ CPU             ",
+        "STACK:irqpct".$color{"color23"}.":$Lang::tr{'cpu irq usage'}",
         "GPRINT:irqpct:MAX:%3.2lf%%",
         "GPRINT:irqpct:AVERAGE:%3.2lf%%",
         "GPRINT:irqpct:MIN:%3.2lf%%",
         "GPRINT:irqpct:LAST:%3.2lf%%\\j",
-        "STACK:userpct".$color{"color11"}.":$tr{'user cpu usage'}",
+        "STACK:userpct".$color{"color11"}.":$Lang::tr{'user cpu usage'}",
         "GPRINT:userpct:MAX:%3.2lf%%",
         "GPRINT:userpct:AVERAGE:%3.2lf%%",
         "GPRINT:userpct:MIN:%3.2lf%%",
         "GPRINT:userpct:LAST:%3.2lf%%\\j",
-        "STACK:systempct".$color{"color13"}.":$tr{'system cpu usage'}",
+        "STACK:systempct".$color{"color13"}.":$Lang::tr{'system cpu usage'}",
         "GPRINT:systempct:MAX:%3.2lf%%",
         "GPRINT:systempct:AVERAGE:%3.2lf%%",
         "GPRINT:systempct:MIN:%3.2lf%%",
         "GPRINT:systempct:LAST:%3.2lf%%\\j",
-        "STACK:idlepct".$color{"color12"}.":$tr{'idle cpu usage'}",
+        "STACK:idlepct".$color{"color12"}.":$Lang::tr{'idle cpu usage'}",
         "GPRINT:idlepct:MAX:%3.2lf%%",
         "GPRINT:idlepct:AVERAGE:%3.2lf%%",
         "GPRINT:idlepct:MIN:%3.2lf%%",
@@ -139,7 +136,7 @@ sub updatememgraph {
         "--color", "SHADEA".$color{"color19"},
         "--color", "SHADEB".$color{"color19"},
         "--color", "BACK".$color{"color21"},
-        "-t $tr{'memory usage per'} $tr{$period}",
+        "-t $Lang::tr{'memory usage per'} $Lang::tr{$period}",
         "DEF:used=$rrdlog/mem.rrd:memused:AVERAGE",
         "DEF:free=$rrdlog/mem.rrd:memfree:AVERAGE",
         "DEF:shared=$rrdlog/mem.rrd:memshared:AVERAGE",
@@ -152,32 +149,32 @@ sub updatememgraph {
         "CDEF:bufferpct=100,buffer,total,/,*",
         "CDEF:cachepct=100,cache,total,/,*",
         "CDEF:freepct=100,free,total,/,*",
-        "COMMENT:$tr{'caption'}\\t\\t\\t",
-        "COMMENT:$tr{'maximal'}",
-        "COMMENT:$tr{'average'}",
-        "COMMENT:$tr{'minimal'}",
-        "COMMENT:$tr{'current'}\\j",
-        "AREA:usedpct".$color{"color11"}.":$tr{'used memory'}",
+        "COMMENT:$Lang::tr{'caption'}\\t\\t\\t",
+        "COMMENT:$Lang::tr{'maximal'}",
+        "COMMENT:$Lang::tr{'average'}",
+        "COMMENT:$Lang::tr{'minimal'}",
+        "COMMENT:$Lang::tr{'current'}\\j",
+        "AREA:usedpct".$color{"color11"}.":$Lang::tr{'used memory'}",
         "GPRINT:usedpct:MAX:%3.2lf%%",
         "GPRINT:usedpct:AVERAGE:%3.2lf%%",
         "GPRINT:usedpct:MIN:%3.2lf%%",
         "GPRINT:usedpct:LAST:%3.2lf%%\\j",
-        "STACK:sharedpct".$color{"color13"}.":$tr{'shared memory'}",
+        "STACK:sharedpct".$color{"color13"}.":$Lang::tr{'shared memory'}",
         "GPRINT:sharedpct:MAX:%3.2lf%%",
         "GPRINT:sharedpct:AVERAGE:%3.2lf%%",
         "GPRINT:sharedpct:MIN:%3.2lf%%",
         "GPRINT:sharedpct:LAST:%3.2lf%%\\j",
-        "STACK:bufferpct".$color{"color23"}.":$tr{'buffered memory'}",
+        "STACK:bufferpct".$color{"color23"}.":$Lang::tr{'buffered memory'}",
         "GPRINT:bufferpct:MAX:%3.2lf%%",
         "GPRINT:bufferpct:AVERAGE:%3.2lf%%",
         "GPRINT:bufferpct:MIN:%3.2lf%%",
         "GPRINT:bufferpct:LAST:%3.2lf%%\\j",
-        "STACK:cachepct".$color{"color14"}.":$tr{'cached memory'}",
+        "STACK:cachepct".$color{"color14"}.":$Lang::tr{'cached memory'}",
         "GPRINT:cachepct:MAX:%3.2lf%%",
         "GPRINT:cachepct:AVERAGE:%3.2lf%%",
         "GPRINT:cachepct:MIN:%3.2lf%%",
         "GPRINT:cachepct:LAST:%3.2lf%%\\j",
-        "STACK:freepct".$color{"color12"}.":$tr{'free memory'}",
+        "STACK:freepct".$color{"color12"}.":$Lang::tr{'free memory'}",
         "GPRINT:freepct:MAX:%3.2lf%%",
         "GPRINT:freepct:AVERAGE:%3.2lf%%",
         "GPRINT:freepct:MIN:%3.2lf%%",
@@ -191,23 +188,23 @@ sub updatememgraph {
         "--color", "SHADEA".$color{"color19"},
         "--color", "SHADEB".$color{"color19"},
         "--color", "BACK".$color{"color21"},
-        "-t $tr{'swap usage per'} $tr{$period}",
+        "-t $Lang::tr{'swap usage per'} $Lang::tr{$period}",
         "DEF:used=$rrdlog/mem.rrd:swapused:AVERAGE",
         "DEF:free=$rrdlog/mem.rrd:swapfree:AVERAGE",
         "CDEF:total=used,free,+",
         "CDEF:usedpct=100,used,total,/,*",
         "CDEF:freepct=100,free,total,/,*",
-        "COMMENT:$tr{'caption'}\\t\\t",
-        "COMMENT:$tr{'maximal'}",
-        "COMMENT:$tr{'average'}",
-        "COMMENT:$tr{'minimal'}",
-        "COMMENT:$tr{'current'}\\j",
-        "AREA:usedpct".$color{"color11"}.":$tr{'used swap'}",
+        "COMMENT:$Lang::tr{'caption'}\\t\\t",
+        "COMMENT:$Lang::tr{'maximal'}",
+        "COMMENT:$Lang::tr{'average'}",
+        "COMMENT:$Lang::tr{'minimal'}",
+        "COMMENT:$Lang::tr{'current'}\\j",
+        "AREA:usedpct".$color{"color11"}.":$Lang::tr{'used swap'}",
         "GPRINT:usedpct:MAX:%3.2lf%%",
         "GPRINT:usedpct:AVERAGE:%3.2lf%%",
         "GPRINT:usedpct:MIN:%3.2lf%%",
         "GPRINT:usedpct:LAST:%3.2lf%%\\j",
-        "STACK:freepct".$color{"color12"}.":$tr{'free swap'}",
+        "STACK:freepct".$color{"color12"}.":$Lang::tr{'free swap'}",
         "GPRINT:freepct:MAX:%3.2lf%%",
         "GPRINT:freepct:AVERAGE:%3.2lf%%",
         "GPRINT:freepct:MIN:%3.2lf%%",
@@ -226,21 +223,21 @@ sub updatediskgraph {
         "--color", "SHADEA".$color{"color19"},
         "--color", "SHADEB".$color{"color19"},
         "--color", "BACK".$color{"color21"},
-        "-t $tr{'disk access per'} $tr{$period} $disk",
+        "-t $Lang::tr{'disk access per'} $Lang::tr{$period} $disk",
         "DEF:read=$rrdlog/disk-$disk.rrd:readsect:AVERAGE",
         "DEF:write=$rrdlog/disk-$disk.rrd:writesect:AVERAGE",
-        "AREA:read".$color{"color11"}.":$tr{'sectors read from disk per second'}",
-        "STACK:write".$color{"color12"}.":$tr{'sectors written to disk per second'}\\j",
+        "AREA:read".$color{"color11"}.":$Lang::tr{'sectors read from disk per second'}",
+        "STACK:write".$color{"color12"}.":$Lang::tr{'sectors written to disk per second'}\\j",
         "COMMENT: \\j",
-        "COMMENT:$tr{'maximal'}",
-        "COMMENT:$tr{'average'}",
-        "COMMENT:$tr{'current'}\\j",
-        "GPRINT:read:MAX:$tr{'read sectors'}\\:%8.0lf",
-        "GPRINT:read:AVERAGE:$tr{'read sectors'}\\:%8.0lf",
-        "GPRINT:read:LAST:$tr{'read sectors'}\\:%8.0lf\\j",
-        "GPRINT:write:MAX:$tr{'written sectors'}\\:%8.0lf",
-        "GPRINT:write:AVERAGE:$tr{'written sectors'}\\:%8.0lf",
-        "GPRINT:write:LAST:$tr{'written sectors'}\\:%8.0lf\\j");
+        "COMMENT:$Lang::tr{'maximal'}",
+        "COMMENT:$Lang::tr{'average'}",
+        "COMMENT:$Lang::tr{'current'}\\j",
+        "GPRINT:read:MAX:$Lang::tr{'read sectors'}\\:%8.0lf",
+        "GPRINT:read:AVERAGE:$$Lang::tr{'read sectors'}\\:%8.0lf",
+        "GPRINT:read:LAST:$Lang::tr{'read sectors'}\\:%8.0lf\\j",
+        "GPRINT:write:MAX:$Lang::tr{'written sectors'}\\:%8.0lf",
+        "GPRINT:write:AVERAGE:$Lang::tr{'written sectors'}\\:%8.0lf",
+        "GPRINT:write:LAST:$Lang::tr{'written sectors'}\\:%8.0lf\\j");
         $ERROR = RRDs::error;
         print "Error in RRD::graph for disk: $ERROR\n" if $ERROR;
 }
@@ -255,25 +252,25 @@ sub updateifgraph {
   "--color", "SHADEA".$color{"color19"},
   "--color", "SHADEB".$color{"color19"},
   "--color", "BACK".$color{"color21"},
-  "-t $tr{'traffic on'} $interface ($tr{'graph per'} $tr{$period})",
-  "-v$tr{'bytes per second'}",
+  "-t $Lang::tr{'traffic on'} $interface ($Lang::tr{'graph per'} $Lang::tr{$period})",
+  "-v$Lang::tr{'bytes per second'}",
   "DEF:incoming=$rrdlog/$interface.rrd:incoming:AVERAGE",
   "DEF:outgoing=$rrdlog/$interface.rrd:outgoing:AVERAGE",
-  "AREA:incoming".$color{"color11"}.":$tr{'incoming traffic in bytes per second'}",
-  "AREA:outgoing".$color{"color12"}.":$tr{'outgoing traffic in bytes per second'}\\j",
+  "AREA:incoming".$color{"color11"}.":$Lang::tr{'incoming traffic in bytes per second'}",
+  "AREA:outgoing".$color{"color12"}.":$Lang::tr{'outgoing traffic in bytes per second'}\\j",
   "COMMENT: \\j",
-  "COMMENT:$tr{'maximal'}",
-  "COMMENT:$tr{'average'}",
-  "COMMENT:$tr{'minimal'}",
-  "COMMENT:$tr{'current'}\\j",
-  "GPRINT:incoming:MAX:$tr{'in'}\\:%8.3lf %sBps",
-  "GPRINT:incoming:AVERAGE:$tr{'in'}\\:%8.3lf %sBps",
-  "GPRINT:incoming:MIN:$tr{'in'}\\:%8.3lf %sBps",
-  "GPRINT:incoming:LAST:$tr{'in'}\\:%8.3lf %sBps\\j",
-  "GPRINT:outgoing:MAX:$tr{'out'}\\:%8.3lf %sBps",
-  "GPRINT:outgoing:AVERAGE:$tr{'out'}\\:%8.3lf %sBps",
-  "GPRINT:outgoing:MIN:$tr{'out'}\\:%8.3lf %sBps",
-  "GPRINT:outgoing:LAST:$tr{'out'}\\:%8.3lf %sBps\\j");
+  "COMMENT:$Lang::tr{'maximal'}",
+  "COMMENT:$Lang::tr{'average'}",
+  "COMMENT:$Lang::tr{'minimal'}",
+  "COMMENT:$Lang::tr{'current'}\\j",
+  "GPRINT:incoming:MAX:$Lang::tr{'in'}\\:%8.3lf %sBps",
+  "GPRINT:incoming:AVERAGE:$Lang::tr{'in'}\\:%8.3lf %sBps",
+  "GPRINT:incoming:MIN:$Lang::tr{'in'}\\:%8.3lf %sBps",
+  "GPRINT:incoming:LAST:$Lang::tr{'in'}\\:%8.3lf %sBps\\j",
+  "GPRINT:outgoing:MAX:$Lang::tr{'out'}\\:%8.3lf %sBps",
+  "GPRINT:outgoing:AVERAGE:$$Lang::tr{'out'}\\:%8.3lf %sBps",
+  "GPRINT:outgoing:MIN:$Lang::tr{'out'}\\:%8.3lf %sBps",
+  "GPRINT:outgoing:LAST:$Lang::tr{'out'}\\:%8.3lf %sBps\\j");
   $ERROR = RRDs::error;
   print "Error in RRD::graph for $interface: $ERROR\n" if $ERROR;
 }
@@ -287,20 +284,20 @@ sub updatefwhitsgraph {
   "--color", "SHADEA".$color{"color19"},
   "--color", "SHADEB".$color{"color19"},
   "--color", "BACK".$color{"color21"},
-  "-t $tr{'firewall hits per'} $tr{$period}",
+  "-t $Lang::tr{'firewall hits per'} $Lang::tr{$period}",
   "DEF:amount=$rrdlog/firewallhits.rrd:amount:AVERAGE",
   "DEF:portamount=$rrdlog/firewallhits.rrd:portamount:AVERAGE",
-  "COMMENT:$tr{'caption'}\\t\\t\\t",
-  "COMMENT:$tr{'maximal'}",
-  "COMMENT:$tr{'average'}",
-  "COMMENT:$tr{'minimal'}",
-  "COMMENT:$tr{'current'}\\j",
-  "AREA:amount".$color{"color24"}.":$tr{'firewallhits'}/5 min",
+  "COMMENT:$Lang::tr{'caption'}\\t\\t\\t",
+  "COMMENT:$Lang::tr{'maximal'}",
+  "COMMENT:$Lang::tr{'average'}",
+  "COMMENT:$Lang::tr{'minimal'}",
+  "COMMENT:$Lang::tr{'current'}\\j",
+  "AREA:amount".$color{"color24"}.":$Lang::tr{'firewallhits'}/5 min",
   "GPRINT:amount:MAX:%2.2lf %S",
   "GPRINT:amount:AVERAGE:%2.2lf %S",
   "GPRINT:amount:MIN:%2.2lf %S",
   "GPRINT:amount:LAST:%2.2lf %S\\j",
-  "STACK:portamount".$color{"color25"}.":$tr{'portscans'}/5 min",
+  "STACK:portamount".$color{"color25"}.":$Lang::tr{'portscans'}/5 min",
   "GPRINT:portamount:MAX:%2.2lf %S",
   "GPRINT:portamount:MIN:%2.2lf %S",
   "GPRINT:portamount:AVERAGE:%2.2lf %S",
@@ -314,7 +311,7 @@ sub updatelqgraph {
   RRDs::graph ("$graphs/lq-$period.png",
   "--start", "-1$period", "-aPNG", "-i", "-z",
   "--alt-y-grid", "-w 600", "-h 100", "-l 0", "-r",
-  "-t $tr{'linkq'} ($tr{'graph per'} $tr{$period})",
+  "-t $Lang::tr{'linkq'} ($Lang::tr{'graph per'} $Lang::tr{$period})",
   "--lazy", 
   "--color", "SHADEA".$color{"color19"},
   "--color", "SHADEB".$color{"color19"},
@@ -335,10 +332,10 @@ sub updatelqgraph {
   "AREA:r0".$color{"color12"}.":<30 ms",
   "AREA:loss10".$color{"color13"}.":Packet loss (x10)\\j",
   "COMMENT: \\j",
-  "COMMENT:$tr{'maximal'}",
-  "COMMENT:$tr{'average'}",
-  "COMMENT:$tr{'minimal'}",
-  "COMMENT:$tr{'current'}\\j",
+  "COMMENT:$Lang::tr{'maximal'}",
+  "COMMENT:$Lang::tr{'average'}",
+  "COMMENT:$Lang::tr{'minimal'}",
+  "COMMENT:$Lang::tr{'current'}\\j",
   "LINE1:roundtrip#707070:",
   "GPRINT:roundtrip:MAX:Time\\:%3.2lf ms",
   "GPRINT:roundtrip:AVERAGE:Time\\:%3.2lf ms",
@@ -364,13 +361,13 @@ sub updatehddgraph {
   "--color", "SHADEA".$color{"color19"},
   "--color", "SHADEB".$color{"color19"},
   "--color", "BACK".$color{"color21"},
-  "-t $tr{'harddisk temperature'} ($tr{'graph per'} $tr{$period})",
+  "-t $Lang::tr{'harddisk temperature'} ($Lang::tr{'graph per'} $Lang::tr{$period})",
   "DEF:temperature=$rrdlog/hddtemp-$disk.rrd:temperature:AVERAGE",
-  "LINE2:temperature".$color{"color11"}.":$tr{'hdd temperature in'} C\\j",
-  "COMMENT:$tr{'maximal'}",
-  "COMMENT:$tr{'average'}",
-  "COMMENT:$tr{'minimal'}",
-  "COMMENT:$tr{'current'}\\j",
+  "LINE2:temperature".$color{"color11"}.":$Lang::tr{'hdd temperature in'} C\\j",
+  "COMMENT:$Lang::tr{'maximal'}",
+  "COMMENT:$Lang::tr{'average'}",
+  "COMMENT:$Lang::tr{'minimal'}",
+  "COMMENT:$Lang::tr{'current'}\\j",
   "GPRINT:temperature:MAX:%3.0lf Grad C",
   "GPRINT:temperature:AVERAGE:%3.0lf Grad C",
   "GPRINT:temperature:MIN:%3.0lf Grad C",
@@ -392,12 +389,12 @@ sub updatetempgraph
     "--color", "SHADEA".$color{"color19"},
     "--color", "SHADEB".$color{"color19"},
     "--color", "BACK".$color{"color21"},
-    "-t $tr{'mbmon temp'} ($tr{'graph per'} $tr{$period})",
-    "COMMENT:$tr{'caption'}\\t\\t",
-    "COMMENT:$tr{'maximal'}",
-    "COMMENT:$tr{'average'}",
-    "COMMENT:$tr{'minimal'}",
-    "COMMENT:$tr{'current'}\\j",);
+    "-t $Lang::tr{'mbmon temp'} ($Lang::tr{'graph per'} $Lang::tr{$period})",
+    "COMMENT:$Lang::tr{'caption'}\\t\\t",
+    "COMMENT:$Lang::tr{'maximal'}",
+    "COMMENT:$Lang::tr{'average'}",
+    "COMMENT:$Lang::tr{'minimal'}",
+    "COMMENT:$Lang::tr{'current'}\\j",);
     
   foreach $key ( sort(keys %mbmon_values) ) 
   {
@@ -433,12 +430,12 @@ sub updatefangraph
     "--color", "SHADEA".$color{"color19"},
     "--color", "SHADEB".$color{"color19"},
     "--color", "BACK".$color{"color21"},
-    "-t $tr{'mbmon fan'} ($tr{'graph per'} $tr{$period})",
-    "COMMENT:$tr{'caption'}\\t\\t",
-    "COMMENT:$tr{'maximal'}",
-    "COMMENT:$tr{'average'}",
-    "COMMENT:$tr{'minimal'}",
-    "COMMENT:$tr{'current'}\\j",);
+    "-t $Lang::tr{'mbmon fan'} ($Lang::tr{'graph per'} $Lang::tr{$period})",
+    "COMMENT:$Lang::tr{'caption'}\\t\\t",
+    "COMMENT:$Lang::tr{'maximal'}",
+    "COMMENT:$Lang::tr{'average'}",
+    "COMMENT:$Lang::tr{'minimal'}",
+    "COMMENT:$Lang::tr{'current'}\\j",);
 
   foreach $key ( sort(keys %mbmon_values) ) 
   {
@@ -474,12 +471,12 @@ sub updatevoltgraph
     "--color", "SHADEA".$color{"color19"},
     "--color", "SHADEB".$color{"color19"},
     "--color", "BACK".$color{"color21"},
-    "-t $tr{'mbmon volt'} ($tr{'graph per'} $tr{$period})",
-    "COMMENT:$tr{'caption'}\\t",
-    "COMMENT:$tr{'maximal'}",
-    "COMMENT:$tr{'average'}",
-    "COMMENT:$tr{'minimal'}",
-    "COMMENT:$tr{'current'}\\j",);
+    "-t $Lang::tr{'mbmon volt'} ($Lang::tr{'graph per'} $Lang::tr{$period})",
+    "COMMENT:$Lang::tr{'caption'}\\t",
+    "COMMENT:$Lang::tr{'maximal'}",
+    "COMMENT:$Lang::tr{'average'}",
+    "COMMENT:$Lang::tr{'minimal'}",
+    "COMMENT:$Lang::tr{'current'}\\j",);
 
   foreach $key ( sort(keys %mbmon_values) ) 
   {
index 182d95c..843fd28 100644 (file)
@@ -42,7 +42,6 @@ WARNING: translation string unused: and
 WARNING: translation string unused: apply
 WARNING: translation string unused: archive not exist
 WARNING: translation string unused: available updates
-WARNING: translation string unused: average
 WARNING: translation string unused: backup config floppy
 WARNING: translation string unused: backup configuration
 WARNING: translation string unused: backup export key
@@ -57,11 +56,8 @@ WARNING: translation string unused: bad characters in
 WARNING: translation string unused: bleeding rules
 WARNING: translation string unused: blue access use hint
 WARNING: translation string unused: blue interface
-WARNING: translation string unused: buffered memory
-WARNING: translation string unused: bytes per second
 WARNING: translation string unused: cache management
 WARNING: translation string unused: cache size
-WARNING: translation string unused: cached memory
 WARNING: translation string unused: calamaris report interval (in minutes)
 WARNING: translation string unused: calc traffic all x minutes
 WARNING: translation string unused: capsinactive
@@ -80,11 +76,8 @@ WARNING: translation string unused: could not download the available updates lis
 WARNING: translation string unused: could not open available updates file
 WARNING: translation string unused: could not open installed updates file
 WARNING: translation string unused: could not open update information file
-WARNING: translation string unused: cpu irq usage
-WARNING: translation string unused: cpu usage per
 WARNING: translation string unused: create
 WARNING: translation string unused: create new backup
-WARNING: translation string unused: current
 WARNING: translation string unused: current dynamic leases
 WARNING: translation string unused: current media
 WARNING: translation string unused: current ovpn
@@ -104,7 +97,6 @@ WARNING: translation string unused: dial user password
 WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
-WARNING: translation string unused: disk access per
 WARNING: translation string unused: display traffic at home
 WARNING: translation string unused: dns server
 WARNING: translation string unused: do not log this port list
@@ -134,14 +126,10 @@ WARNING: translation string unused: expected
 WARNING: translation string unused: exportkey
 WARNING: translation string unused: external access rule changed
 WARNING: translation string unused: filename
-WARNING: translation string unused: firewall hits per
 WARNING: translation string unused: firewall log viewer
-WARNING: translation string unused: firewallhits
 WARNING: translation string unused: firmware
 WARNING: translation string unused: firmware upload
 WARNING: translation string unused: force update
-WARNING: translation string unused: free memory
-WARNING: translation string unused: free swap
 WARNING: translation string unused: fritzdsl help
 WARNING: translation string unused: fritzdsl upload
 WARNING: translation string unused: from email adr
@@ -152,10 +140,8 @@ WARNING: translation string unused: from warn email bad
 WARNING: translation string unused: gen static key
 WARNING: translation string unused: generate
 WARNING: translation string unused: genkey
-WARNING: translation string unused: graph per
 WARNING: translation string unused: green interface
 WARNING: translation string unused: gz with key
-WARNING: translation string unused: hdd temperature in
 WARNING: translation string unused: hint
 WARNING: translation string unused: host
 WARNING: translation string unused: host configuration
@@ -163,11 +149,8 @@ WARNING: translation string unused: hostname and domain already in use
 WARNING: translation string unused: hours2
 WARNING: translation string unused: id
 WARNING: translation string unused: idle cpu
-WARNING: translation string unused: idle cpu usage
 WARNING: translation string unused: import
 WARNING: translation string unused: importkey
-WARNING: translation string unused: in
-WARNING: translation string unused: incoming traffic in bytes per second
 WARNING: translation string unused: incorrect password
 WARNING: translation string unused: insert floppy
 WARNING: translation string unused: install new update
@@ -180,7 +163,6 @@ WARNING: translation string unused: invalid port list
 WARNING: translation string unused: invalid time entered
 WARNING: translation string unused: invalid uplink speed
 WARNING: translation string unused: invalid upstream proxy username or password setting
-WARNING: translation string unused: iowait
 WARNING: translation string unused: ip address in use
 WARNING: translation string unused: ipfire side
 WARNING: translation string unused: iptable rules
@@ -191,7 +173,6 @@ WARNING: translation string unused: kernel version
 WARNING: translation string unused: key stuff
 WARNING: translation string unused: lateprompting
 WARNING: translation string unused: line
-WARNING: translation string unused: linkq
 WARNING: translation string unused: loaded modules
 WARNING: translation string unused: local hard disk
 WARNING: translation string unused: localkeyfile
@@ -214,14 +195,11 @@ WARNING: translation string unused: marked
 WARNING: translation string unused: max incoming size
 WARNING: translation string unused: max outgoing size
 WARNING: translation string unused: max size
-WARNING: translation string unused: maximal
 WARNING: translation string unused: mbmon fan in
 WARNING: translation string unused: mbmon graphs
 WARNING: translation string unused: mbmon settings
 WARNING: translation string unused: mbmon temp in
-WARNING: translation string unused: memory usage per
 WARNING: translation string unused: min size
-WARNING: translation string unused: minimal
 WARNING: translation string unused: minutes
 WARNING: translation string unused: missing dat
 WARNING: translation string unused: missing gz
@@ -254,8 +232,6 @@ WARNING: translation string unused: optionsfw warning
 WARNING: translation string unused: or
 WARNING: translation string unused: original
 WARNING: translation string unused: other countries
-WARNING: translation string unused: out
-WARNING: translation string unused: outgoing traffic in bytes per second
 WARNING: translation string unused: ovpn
 WARNING: translation string unused: ovpn config
 WARNING: translation string unused: ovpn dl
@@ -281,14 +257,12 @@ WARNING: translation string unused: password contains illegal characters
 WARNING: translation string unused: password crypting key
 WARNING: translation string unused: passwords must be at least 6 characters in length
 WARNING: translation string unused: polfile
-WARNING: translation string unused: portscans
 WARNING: translation string unused: pots
 WARNING: translation string unused: profiles
 WARNING: translation string unused: proxy no proxy extend
 WARNING: translation string unused: proxy no proxy local
 WARNING: translation string unused: proxy port
 WARNING: translation string unused: psk
-WARNING: translation string unused: read sectors
 WARNING: translation string unused: reboot schedule
 WARNING: translation string unused: rebooting
 WARNING: translation string unused: refresh update list
@@ -303,14 +277,11 @@ WARNING: translation string unused: root user password
 WARNING: translation string unused: route subnet is invalid
 WARNING: translation string unused: safe removal of umounted device
 WARNING: translation string unused: save error
-WARNING: translation string unused: sectors read from disk per second
-WARNING: translation string unused: sectors written to disk per second
 WARNING: translation string unused: select media
 WARNING: translation string unused: send email notification
 WARNING: translation string unused: send test mail
 WARNING: translation string unused: server reserved
 WARNING: translation string unused: shaping list options
-WARNING: translation string unused: shared memory
 WARNING: translation string unused: shutdown control
 WARNING: translation string unused: shutdown2
 WARNING: translation string unused: shutting down
@@ -328,9 +299,7 @@ WARNING: translation string unused: subject test
 WARNING: translation string unused: subject warn
 WARNING: translation string unused: subnet
 WARNING: translation string unused: successfully refreshed updates list
-WARNING: translation string unused: swap usage per
 WARNING: translation string unused: system cpu
-WARNING: translation string unused: system cpu usage
 WARNING: translation string unused: system log viewer
 WARNING: translation string unused: system status information
 WARNING: translation string unused: test
@@ -354,7 +323,6 @@ WARNING: translation string unused: traffic calc time
 WARNING: translation string unused: traffic calc time bad
 WARNING: translation string unused: traffic info messages
 WARNING: translation string unused: traffic monitor
-WARNING: translation string unused: traffic on
 WARNING: translation string unused: traffic shaping
 WARNING: translation string unused: traffic shaping settings
 WARNING: translation string unused: traffic warn level bad
@@ -381,9 +349,6 @@ WARNING: translation string unused: urlfilter update information
 WARNING: translation string unused: urlfilter update notification
 WARNING: translation string unused: urlfilter update results
 WARNING: translation string unused: use
-WARNING: translation string unused: used memory
-WARNING: translation string unused: used swap
-WARNING: translation string unused: user cpu usage
 WARNING: translation string unused: view log
 WARNING: translation string unused: vpn on blue
 WARNING: translation string unused: vpn on green
@@ -392,6 +357,5 @@ WARNING: translation string unused: warn when traffic reaches
 WARNING: translation string unused: web proxy configuration
 WARNING: translation string unused: week
 WARNING: translation string unused: weekly firewallhits
-WARNING: translation string unused: written sectors
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: yearly firewallhits
index d103c4b..646c420 100644 (file)
@@ -44,7 +44,6 @@ WARNING: translation string unused: ansi t1.483
 WARNING: translation string unused: apply
 WARNING: translation string unused: archive not exist
 WARNING: translation string unused: available updates
-WARNING: translation string unused: average
 WARNING: translation string unused: backup archive
 WARNING: translation string unused: backup clear archive
 WARNING: translation string unused: backup config floppy
@@ -73,11 +72,8 @@ WARNING: translation string unused: bewan adsl pci st
 WARNING: translation string unused: bewan adsl usb
 WARNING: translation string unused: bleeding rules
 WARNING: translation string unused: blue interface
-WARNING: translation string unused: buffered memory
-WARNING: translation string unused: bytes per second
 WARNING: translation string unused: cache management
 WARNING: translation string unused: cache size
-WARNING: translation string unused: cached memory
 WARNING: translation string unused: calamaris report interval (in minutes)
 WARNING: translation string unused: calc traffic all x minutes
 WARNING: translation string unused: capsinactive
@@ -97,10 +93,7 @@ WARNING: translation string unused: could not download the available updates lis
 WARNING: translation string unused: could not open available updates file
 WARNING: translation string unused: could not open installed updates file
 WARNING: translation string unused: could not open update information file
-WARNING: translation string unused: cpu irq usage
-WARNING: translation string unused: cpu usage per
 WARNING: translation string unused: create
-WARNING: translation string unused: current
 WARNING: translation string unused: current dynamic leases
 WARNING: translation string unused: current media
 WARNING: translation string unused: current ovpn
@@ -115,7 +108,6 @@ WARNING: translation string unused: dial user password
 WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
-WARNING: translation string unused: disk access per
 WARNING: translation string unused: display traffic at home
 WARNING: translation string unused: do not log this port list
 WARNING: translation string unused: done
@@ -144,14 +136,10 @@ WARNING: translation string unused: expected
 WARNING: translation string unused: exportkey
 WARNING: translation string unused: external access rule changed
 WARNING: translation string unused: filename
-WARNING: translation string unused: firewall hits per
 WARNING: translation string unused: firewall log viewer
-WARNING: translation string unused: firewallhits
 WARNING: translation string unused: firmware
 WARNING: translation string unused: firmware upload
 WARNING: translation string unused: force update
-WARNING: translation string unused: free memory
-WARNING: translation string unused: free swap
 WARNING: translation string unused: fritzdsl help
 WARNING: translation string unused: fritzdsl upload
 WARNING: translation string unused: from email adr
@@ -164,10 +152,8 @@ WARNING: translation string unused: g.lite
 WARNING: translation string unused: gen static key
 WARNING: translation string unused: generate
 WARNING: translation string unused: genkey
-WARNING: translation string unused: graph per
 WARNING: translation string unused: green interface
 WARNING: translation string unused: gz with key
-WARNING: translation string unused: hdd temperature in
 WARNING: translation string unused: hint
 WARNING: translation string unused: host
 WARNING: translation string unused: host configuration
@@ -175,11 +161,8 @@ WARNING: translation string unused: hostname and domain already in use
 WARNING: translation string unused: hours2
 WARNING: translation string unused: id
 WARNING: translation string unused: idle cpu
-WARNING: translation string unused: idle cpu usage
 WARNING: translation string unused: import
 WARNING: translation string unused: importkey
-WARNING: translation string unused: in
-WARNING: translation string unused: incoming traffic in bytes per second
 WARNING: translation string unused: incorrect password
 WARNING: translation string unused: insert floppy
 WARNING: translation string unused: insert removable device
@@ -193,7 +176,6 @@ WARNING: translation string unused: invalid port list
 WARNING: translation string unused: invalid time entered
 WARNING: translation string unused: invalid uplink speed
 WARNING: translation string unused: invalid upstream proxy username or password setting
-WARNING: translation string unused: iowait
 WARNING: translation string unused: ip address in use
 WARNING: translation string unused: ipfire side
 WARNING: translation string unused: iptable rules
@@ -204,7 +186,6 @@ WARNING: translation string unused: kernel version
 WARNING: translation string unused: key stuff
 WARNING: translation string unused: lateprompting
 WARNING: translation string unused: line
-WARNING: translation string unused: linkq
 WARNING: translation string unused: loaded modules
 WARNING: translation string unused: local hard disk
 WARNING: translation string unused: localkeyfile
@@ -227,14 +208,11 @@ WARNING: translation string unused: marked
 WARNING: translation string unused: max incoming size
 WARNING: translation string unused: max outgoing size
 WARNING: translation string unused: max size
-WARNING: translation string unused: maximal
 WARNING: translation string unused: mbmon fan in
 WARNING: translation string unused: mbmon graphs
 WARNING: translation string unused: mbmon settings
 WARNING: translation string unused: mbmon temp in
-WARNING: translation string unused: memory usage per
 WARNING: translation string unused: min size
-WARNING: translation string unused: minimal
 WARNING: translation string unused: minutes
 WARNING: translation string unused: missing dat
 WARNING: translation string unused: missing gz
@@ -267,8 +245,6 @@ WARNING: translation string unused: optionsfw portlist hint
 WARNING: translation string unused: optionsfw warning
 WARNING: translation string unused: original
 WARNING: translation string unused: other countries
-WARNING: translation string unused: out
-WARNING: translation string unused: outgoing traffic in bytes per second
 WARNING: translation string unused: ovpn
 WARNING: translation string unused: ovpn config
 WARNING: translation string unused: ovpn dl
@@ -293,13 +269,11 @@ WARNING: translation string unused: package failed to install
 WARNING: translation string unused: password contains illegal characters
 WARNING: translation string unused: passwords must be at least 6 characters in length
 WARNING: translation string unused: polfile
-WARNING: translation string unused: portscans
 WARNING: translation string unused: pots
 WARNING: translation string unused: profiles
 WARNING: translation string unused: proxy port
 WARNING: translation string unused: psk
 WARNING: translation string unused: quick control
-WARNING: translation string unused: read sectors
 WARNING: translation string unused: reboot schedule
 WARNING: translation string unused: rebooting
 WARNING: translation string unused: refresh update list
@@ -311,14 +285,11 @@ WARNING: translation string unused: root
 WARNING: translation string unused: root user password
 WARNING: translation string unused: route subnet is invalid
 WARNING: translation string unused: save error
-WARNING: translation string unused: sectors read from disk per second
-WARNING: translation string unused: sectors written to disk per second
 WARNING: translation string unused: send email notification
 WARNING: translation string unused: send test mail
 WARNING: translation string unused: server reserved
 WARNING: translation string unused: shaping add options
 WARNING: translation string unused: shaping list options
-WARNING: translation string unused: shared memory
 WARNING: translation string unused: show areas
 WARNING: translation string unused: show lines
 WARNING: translation string unused: shutdown control
@@ -336,9 +307,7 @@ WARNING: translation string unused: subject test
 WARNING: translation string unused: subject warn
 WARNING: translation string unused: subnet
 WARNING: translation string unused: successfully refreshed updates list
-WARNING: translation string unused: swap usage per
 WARNING: translation string unused: system cpu
-WARNING: translation string unused: system cpu usage
 WARNING: translation string unused: system log viewer
 WARNING: translation string unused: system status information
 WARNING: translation string unused: test
@@ -361,7 +330,6 @@ WARNING: translation string unused: traffic calc time
 WARNING: translation string unused: traffic calc time bad
 WARNING: translation string unused: traffic info messages
 WARNING: translation string unused: traffic monitor
-WARNING: translation string unused: traffic on
 WARNING: translation string unused: traffic shaping
 WARNING: translation string unused: traffic shaping settings
 WARNING: translation string unused: traffic warn level bad
@@ -387,10 +355,7 @@ WARNING: translation string unused: urlfilter update information
 WARNING: translation string unused: urlfilter update notification
 WARNING: translation string unused: urlfilter update results
 WARNING: translation string unused: use
-WARNING: translation string unused: used memory
-WARNING: translation string unused: used swap
 WARNING: translation string unused: user cpu
-WARNING: translation string unused: user cpu usage
 WARNING: translation string unused: view log
 WARNING: translation string unused: vpn on blue
 WARNING: translation string unused: vpn on green
@@ -399,5 +364,4 @@ WARNING: translation string unused: warn when traffic reaches
 WARNING: translation string unused: web proxy configuration
 WARNING: translation string unused: week
 WARNING: translation string unused: weekly firewallhits
-WARNING: translation string unused: written sectors
 WARNING: translation string unused: yearly firewallhits
diff --git a/html/cgi-bin/redirect.cgi b/html/cgi-bin/redirect.cgi
new file mode 100644 (file)
index 0000000..37ee307
--- /dev/null
@@ -0,0 +1,139 @@
+#!/usr/bin/perl
+
+#
+# redirect.cgi - By IPFire-Team (C)
+#
+
+use CGI qw(param);
+
+$swroot="/var/ipfire";
+
+my %netsettings;
+my %filtersettings;
+
+&readhash("$swroot/ethernet/settings", \%netsettings);
+&readhash("$swroot/urlfilter/settings", \%filtersettings);
+
+$category=param("category");
+$url=param("url");
+$ip=param("ip");
+
+if ($filtersettings{'MSG_TEXT_1'} eq '') {
+       $msgtext1 = "A C C E S S &nbsp;&nbsp; D E N I E D";
+} else { $msgtext1 = $filtersettings{'MSG_TEXT_1'}; }
+if ($filtersettings{'MSG_TEXT_2'} eq '') {
+       $msgtext2 = "Access to the requested page has been denied";
+} else { $msgtext2 = $filtersettings{'MSG_TEXT_2'}; }
+if ($filtersettings{'MSG_TEXT_3'} eq '') {
+       $msgtext3 = "Please contact the Network Administrator if you think there has been an error";
+} else { $msgtext3 = $filtersettings{'MSG_TEXT_3'}; }
+
+if ($category eq '') { $category = '&nbsp;'; } else { $category = '['.$category.']'; }
+
+print "Pragma: no-cache\n";
+print "Cache-control: no-cache\n";
+print "Connection: close\n";
+print "Content-type: text/html\n\n";
+
+print <<END
+
+<html>
+<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
+<title>ACCESS MESSAGE</title>
+</head>
+
+<body>
+<table width="100%" height='100%' border="0">
+<tr>
+               <td colspan='3' width='100%' height='130' align="center" background="http://$netsettings{'GREEN_ADDRESS'}:81/images/background.gif">
+<tr>           <td width='10%'><td align='center' bgcolor='#CC000000' width='80%'><font face="verdana, arial, sans serif" color="#FFFFFF" size="5">
+                                       <b>$msgtext1</b>
+                                       </font>
+               <td width='10%'>
+END
+;
+
+if (!($category eq ""))
+{
+       print <<END
+       <tr>            <td colspan='3' align='center'>
+                               <font face="verdana, arial, sans serif" color="#CC000000" size="1">
+                                       <b>$category</b>
+                               </font>
+END
+;
+}
+print <<END
+<tr>
+                       <td colspan='3' align="center">
+                               <font face="verdana, arial, sans serif" color="#000000" size="4">
+                               <b>$msgtext2</b>
+                               </font>
+                               <font face="verdana,arial,sans serif" color="#000000" size="2">
+END
+;
+
+if (!($url eq ""))
+{
+print <<END
+                                       <p>URL: <a href="$url">$url</a>
+END
+;
+}
+
+if (!($ip eq ""))
+{
+print <<END
+                                       <p>Client IP address: <i>$ip</i>
+END
+;
+}
+
+print <<END
+                                       <br><p>$msgtext3
+                                       </font>
+
+<tr>
+       <td colspan='3' height='60%' valign="bottom" align="right">
+               <font face="verdana,arial,sans serif" color="#656565" size="1">Web Filtering by
+               </font>
+               <a href="http://www.ipfire.eu" target="_blank"><b>
+               <font face="verdana,arial,sans serif" color="#656565" size="1">IPFire</b></a>
+               </font>
+
+</table>
+</body>
+
+</html>
+END
+;
+
+sub readhash
+{
+       my $filename = $_[0];
+       my $hash = $_[1];
+       my ($var, $val);
+
+       if (-e $filename)
+       {
+               open(FILE, $filename) or die "Unable to read file $filename";
+               while (<FILE>)
+               {
+                       chop;
+                       ($var, $val) = split /=/, $_, 2;
+                       if ($var)
+                       {
+                               $val =~ s/^\'//g;
+                               $val =~ s/\'$//g;
+       
+                               # Untaint variables read from hash
+                               $var =~ /([A-Za-z0-9_-]*)/;        $var = $1;
+                               $val =~ /([\w\W]*)/; $val = $1;
+                               $hash->{$var} = $val;
+                       }
+               }
+               close FILE;
+       }
+}
index c900c23..e510641 100755 (executable)
@@ -1,7 +1,11 @@
 #!/usr/bin/perl 
-################################################## 
-#####     VPN-Watch.pl     Version 0.3       ##### 
-################################################## 
+##################################################
+#####     VPN-Watch.pl     Version 0.4       #####
+##################################################
+#                                                #
+#   VPN-Watch is part of the IPFire Firewall     #
+#                                                #
+##################################################
 
 use strict;
 
@@ -45,9 +49,12 @@ foreach (@vpnsettings){
   if ($debug){logger("Checking connection to $remotehostname.");}
   
   my $remoteip = `/usr/bin/ping -c 1 $remotehostname 2>/dev/null | head -n1 | awk '{print \$3}' | tr -d '()' | tr -d ':'`;chomp($remoteip);
-  if ($remoteip eq ""){next;}
-  if (system("ipsec whack --status | grep $remoteip >/dev/null")){
-    logger("Remote IP for host $remotehostname has changed or is not connected, restarting connection to $remoteip.");
+  if ($remoteip eq ""){next;if ($debug){logger("Unable to resolve $remotehostname.");}}
+  my $connected=system("ipsec whack --status | grep $remoteip >/dev/null");
+  my $established=system("ipsec whack --status | grep '$settings[1]' | grep 'ISAKMP SA established' >/dev/null"); 
+  
+  if ( $established  eq "" || $connected eq "" ){
+    logger("Remote IP for host $remotehostname has changed or no connection is established, restarting connection to $remoteip.");
     system("/usr/local/bin/ipsecctrl S $settings[0]");
     next;
   }
@@ -59,3 +66,4 @@ sub logger {
         my $log = shift;
         system("logger -t vpnwatch \"$log\"");
 }
+