Lines 15-20
Link Here
|
15 |
# directives. |
15 |
# directives. |
16 |
$DEBUG=1; |
16 |
$DEBUG=1; |
17 |
$bakpath="/etc/apache/conf/bak"; |
17 |
$bakpath="/etc/apache/conf/bak"; |
|
|
18 |
$apache_version=1; |
18 |
|
19 |
|
19 |
if ((!$ARGV[0]) || (!$ARGV[1]) || (!$ARGV[2]) || (!$ARGV[3])) { |
20 |
if ((!$ARGV[0]) || (!$ARGV[1]) || (!$ARGV[2]) || (!$ARGV[3])) { |
20 |
print "Usage: $0 <conffile> <path/mod_filename.so> <mod_name.c> \n"; |
21 |
print "Usage: $0 <conffile> <path/mod_filename.so> <mod_name.c> \n"; |
Lines 23-28
Link Here
|
23 |
print " before=mod_filename will add before specified module\n"; |
24 |
print " before=mod_filename will add before specified module\n"; |
24 |
print " define=WHATEVER will install module between <IfDefine WHATEVER>\n"; |
25 |
print " define=WHATEVER will install module between <IfDefine WHATEVER>\n"; |
25 |
print " addconf=CONFFILE adds 'Include CONFFILE' in apache.conf\n"; |
26 |
print " addconf=CONFFILE adds 'Include CONFFILE' in apache.conf\n"; |
|
|
27 |
print " apache_version=VERSION allow to choose apache's version\n"; |
26 |
die "\n"; |
28 |
die "\n"; |
27 |
} |
29 |
} |
28 |
|
30 |
|
Lines 72-77
Link Here
|
72 |
if (/addconf=(\S+)/i) { |
74 |
if (/addconf=(\S+)/i) { |
73 |
$addconf="Include $1\n"; |
75 |
$addconf="Include $1\n"; |
74 |
} |
76 |
} |
|
|
77 |
if (/apache_version=(\w+)/i) { |
78 |
$apache_version=$1; |
79 |
} |
80 |
|
75 |
} |
81 |
} |
76 |
|
82 |
|
77 |
|
83 |
|
Lines 199-205
Link Here
|
199 |
print CONFF "LoadModule $name_mod $modso\n"; |
205 |
print CONFF "LoadModule $name_mod $modso\n"; |
200 |
print CONFF "$closedef"; |
206 |
print CONFF "$closedef"; |
201 |
} |
207 |
} |
202 |
if ($.==$lastadd) { |
208 |
if ($.==$lastadd && $apache_version==1 ) { |
203 |
print CONFF "$opendef"; |
209 |
print CONFF "$opendef"; |
204 |
print CONFF "AddModule $modc\n"; |
210 |
print CONFF "AddModule $modc\n"; |
205 |
print CONFF "$closedef"; |
211 |
print CONFF "$closedef"; |