File tree Expand file tree Collapse file tree 4 files changed +94
-0
lines changed Expand file tree Collapse file tree 4 files changed +94
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ if [ " $1 " = " " ]; then
4
+ echo " Usage: $0 /somewhere/httpd.conf"
5
+ exit 1
6
+ fi
7
+
8
+ if [ ! -w $1 ]; then
9
+ echo " You cannot write to $1 "
10
+ exit 1
11
+ fi
12
+
13
+ TMPFILE=tmpfile.$$
14
+
15
+ awk -f conffix.awk < $1 > $TMPFILE
16
+
17
+ if [ " $? " != 0 ]; then
18
+ exit 1
19
+ fi
20
+
21
+ mv -f $1 $1 .orig
22
+ mv -f $TMPFILE $1
23
+ exit 0
24
+
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ if [ " $1 " = " " ]; then
4
+ echo " Usage: $0 /somewhere/.htaccess"
5
+ exit 1
6
+ fi
7
+
8
+ if [ ! -w $1 ]; then
9
+ echo " You cannot write to $1 "
10
+ exit 1
11
+ fi
12
+
13
+ TMPFILE=tmpfile.$$
14
+
15
+ awk -f htaccessfix.awk < $1 > $TMPFILE
16
+
17
+ if [ " $? " != 0 ]; then
18
+ exit 1
19
+ fi
20
+
21
+ mv -f $1 $1 .orig
22
+ mv -f $TMPFILE $1
23
+ exit 0
24
+
Original file line number Diff line number Diff line change
1
+ # $Id$
2
+
3
+ /php3_* / {
4
+ phpcommand= substr ($1 ,6 )
5
+ phpvalue= tolower ($2 )
6
+ print " <IfModule mod_php3.c>"
7
+ print $1 $2
8
+ print " </IfModule>"
9
+ print " <IfModule mod_php4.c>"
10
+ if (phpvalue== " on" ) {
11
+ print " php_admin_flag " phpcommand " on"
12
+ } else if (phpvalue== " off" ) {
13
+ print " php_admin_flag " phpcommand " off"
14
+ } else {
15
+ print " php_admin_value " phpcommand " " substr ($0 ,index ($0 ,$1 )+ length ($1 )+ 1 )
16
+ }
17
+ print " </IfModule>"
18
+ }
19
+
20
+ ! /php3_* / {
21
+ print $0
22
+ }
23
+
Original file line number Diff line number Diff line change
1
+ # $Id$
2
+
3
+ /php3_* / {
4
+ phpcommand= substr ($1 ,6 )
5
+ phpvalue= tolower ($2 )
6
+ print " <IfModule mod_php3.c>"
7
+ print $1 $2
8
+ print " </IfModule>"
9
+ print " <IfModule mod_php4.c>"
10
+ if (phpvalue== " on" ) {
11
+ print " php_flag " phpcommand " on"
12
+ } else if (phpvalue== " off" ) {
13
+ print " php_flag " phpcommand " off"
14
+ } else {
15
+ print " php_value " phpcommand " " substr ($0 ,index ($0 ,$1 )+ length ($1 )+ 1 )
16
+ }
17
+ print " </IfModule>"
18
+ }
19
+
20
+ ! /php3_* / {
21
+ print $0
22
+ }
23
+
You can’t perform that action at this time.
0 commit comments