summaryrefslogtreecommitdiffstats
path: root/web_wizard/scripts/mytest.pl
diff options
context:
space:
mode:
Diffstat (limited to 'web_wizard/scripts/mytest.pl')
-rwxr-xr-xweb_wizard/scripts/mytest.pl28
1 files changed, 28 insertions, 0 deletions
diff --git a/web_wizard/scripts/mytest.pl b/web_wizard/scripts/mytest.pl
new file mode 100755
index 00000000..e13f3708
--- /dev/null
+++ b/web_wizard/scripts/mytest.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+use strict;
+
+open(FH, $ARGV[0]);
+
+my $that;
+
+if ($ENV{wiz_web_external} eq "1") {
+ $that = "all";
+}
+elsif ($ENV{wiz_web_internal} eq "1") {
+ $that = $ip;
+}
+else {
+ $that = "localhost";
+}
+
+
+while(<FH>) {
+ if( m/^[[:space:]]*<Directory \/home/s...m/^[[:space:]]*<\/Directory>/s ) {
+ s/^[[:space:]]*Allow .*$/Allow from $that/s;
+ }
+ if( m /^[[:space:]]*<Directory \/var\/www/s...m/^[[:space:]]*<\/Directory>/s ) {
+ s/^[[:space:]]*Allow .*$/Allow from $that/s;
+ }
+ print $_;
+}
+