Changeset 1339
- Timestamp:
- 09/02/08 18:26:43
(3 months ago)
- Author:
- scitech
- Message:
Fixed #1522: ispcp-httpd-logs-mngr crashes if logfile doesn't exist. Fixed #1523: Weird logfiles for disabled domain
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1338 |
r1339 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | 2008-09-02 Daniel Andreca |
|---|
| | 4 | - ENGINE: |
|---|
| | 5 | * Fixed #1522: ispcp-httpd-logs-mngr crashes if logfile doesn't exist |
|---|
| | 6 | * Fixed #1523: Weird logfiles for disabled domain |
|---|
| | 7 | |
|---|
| 3 | 8 | 2008-09-01 Daniel Andreca |
|---|
| 4 | 9 | - ENGINE: |
|---|
| r1338 |
r1339 |
|
| 82 | 82 | |
|---|
| 83 | 83 | if($log_line =~ m/($main::cfg{'APACHE_WWW_DIR'})/){ |
|---|
| 84 | | ($vhost) = $log_line =~ m/$main::cfg{'APACHE_WWW_DIR'}\/([^\/]*)/; |
|---|
| | 84 | ($vhost) = $log_line =~ m/$main::cfg{'APACHE_WWW_DIR'}\/([a-zA-Z0-9_\-\.]*)/; |
|---|
| 85 | 85 | } else { |
|---|
| 86 | 86 | if($log_line =~ m/($main::cfg{'PHP_STARTER_DIR'})/){ |
|---|
| 87 | | ($vhost) = $log_line =~ m/$main::cfg{'PHP_STARTER_DIR'}\/([^\/]*)/; |
|---|
| | 87 | ($vhost) = $log_line =~ m/$main::cfg{'PHP_STARTER_DIR'}\/([a-zA-Z0-9_\-\.]*)/; |
|---|
| 88 | 88 | } |
|---|
| 89 | 89 | } |
|---|
| r1148 |
r1339 |
|
| 108 | 108 | my $dest_error_file = "$main::cfg{'APACHE_WWW_DIR'}/$domain_name/logs/$subdomain_name-error.log"; |
|---|
| 109 | 109 | |
|---|
| 110 | | my $dest_dir = "$main::cfg{'APACHE_WWW_DIR'}/$domain_name/logs"; |
|---|
| | 110 | my $dest_dir = "$main::cfg{'APACHE_WWW_DIR'}/$domain_name/logs"; |
|---|
| 111 | 111 | |
|---|
| 112 | 112 | if (! -d $dest_dir) |
|---|
| … | … | |
| 118 | 118 | } |
|---|
| 119 | 119 | |
|---|
| 120 | | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_access_file $dest_access_file"; |
|---|
| 121 | | |
|---|
| 122 | | $rs = sys_command($cmd_cp); |
|---|
| 123 | | |
|---|
| 124 | | return $rs if ($rs != 0); |
|---|
| 125 | | |
|---|
| 126 | | $rs = setfmode($dest_access_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| 127 | | |
|---|
| 128 | | return $rs if ($rs != 0); |
|---|
| 129 | | |
|---|
| 130 | | $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_error_file $dest_error_file"; |
|---|
| 131 | | |
|---|
| 132 | | $rs = sys_command($cmd_cp); |
|---|
| 133 | | |
|---|
| 134 | | return $rs if ($rs != 0); |
|---|
| 135 | | |
|---|
| 136 | | $rs = setfmode($dest_error_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| 137 | | |
|---|
| 138 | | return $rs if ($rs != 0); |
|---|
| | 120 | if ( -e $src_access_file ){ |
|---|
| | 121 | |
|---|
| | 122 | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_access_file $dest_access_file"; |
|---|
| | 123 | |
|---|
| | 124 | $rs = sys_command($cmd_cp); |
|---|
| | 125 | |
|---|
| | 126 | return $rs if ($rs != 0); |
|---|
| | 127 | |
|---|
| | 128 | $rs = setfmode($dest_access_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| | 129 | |
|---|
| | 130 | return $rs if ($rs != 0); |
|---|
| | 131 | |
|---|
| | 132 | } |
|---|
| | 133 | |
|---|
| | 134 | if ( -e $src_error_file ){ |
|---|
| | 135 | |
|---|
| | 136 | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_error_file $dest_error_file"; |
|---|
| | 137 | |
|---|
| | 138 | $rs = sys_command($cmd_cp); |
|---|
| | 139 | |
|---|
| | 140 | return $rs if ($rs != 0); |
|---|
| | 141 | |
|---|
| | 142 | $rs = setfmode($dest_error_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| | 143 | |
|---|
| | 144 | return $rs if ($rs != 0); |
|---|
| | 145 | |
|---|
| | 146 | } |
|---|
| 139 | 147 | |
|---|
| 140 | 148 | } |
|---|
| … | … | |
| 184 | 192 | } |
|---|
| 185 | 193 | |
|---|
| 186 | | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_access_file $dest_access_file"; |
|---|
| 187 | | |
|---|
| 188 | | $rs = sys_command($cmd_cp); |
|---|
| 189 | | |
|---|
| 190 | | return $rs if ($rs != 0); |
|---|
| 191 | | |
|---|
| 192 | | $rs = setfmode($dest_access_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| 193 | | |
|---|
| 194 | | return $rs if ($rs != 0); |
|---|
| 195 | | |
|---|
| 196 | | $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_error_file $dest_error_file"; |
|---|
| 197 | | |
|---|
| 198 | | $rs = sys_command($cmd_cp); |
|---|
| 199 | | |
|---|
| 200 | | return $rs if ($rs != 0); |
|---|
| 201 | | |
|---|
| 202 | | $rs = setfmode($dest_error_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| 203 | | |
|---|
| 204 | | return $rs if ($rs != 0); |
|---|
| | 194 | if( -e $src_access_file){ |
|---|
| | 195 | |
|---|
| | 196 | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_access_file $dest_access_file"; |
|---|
| | 197 | |
|---|
| | 198 | $rs = sys_command($cmd_cp); |
|---|
| | 199 | |
|---|
| | 200 | return $rs if ($rs != 0); |
|---|
| | 201 | |
|---|
| | 202 | $rs = setfmode($dest_access_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| | 203 | |
|---|
| | 204 | return $rs if ($rs != 0); |
|---|
| | 205 | |
|---|
| | 206 | } |
|---|
| | 207 | |
|---|
| | 208 | if ( -e $src_error_file ){ |
|---|
| | 209 | |
|---|
| | 210 | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_error_file $dest_error_file"; |
|---|
| | 211 | |
|---|
| | 212 | $rs = sys_command($cmd_cp); |
|---|
| | 213 | |
|---|
| | 214 | return $rs if ($rs != 0); |
|---|
| | 215 | |
|---|
| | 216 | $rs = setfmode($dest_error_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| | 217 | |
|---|
| | 218 | return $rs if ($rs != 0); |
|---|
| | 219 | |
|---|
| | 220 | } |
|---|
| 205 | 221 | |
|---|
| 206 | 222 | } |
|---|
| … | … | |
| 256 | 272 | } |
|---|
| 257 | 273 | |
|---|
| 258 | | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_access_file $dest_access_file"; |
|---|
| 259 | | |
|---|
| 260 | | $rs = sys_command($cmd_cp); |
|---|
| 261 | | |
|---|
| 262 | | return $rs if ($rs != 0); |
|---|
| 263 | | |
|---|
| 264 | | $rs = setfmode($dest_access_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| 265 | | |
|---|
| 266 | | return $rs if ($rs != 0); |
|---|
| 267 | | |
|---|
| 268 | | $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_error_file $dest_error_file"; |
|---|
| 269 | | |
|---|
| 270 | | $rs = sys_command($cmd_cp); |
|---|
| 271 | | |
|---|
| 272 | | return $rs if ($rs != 0); |
|---|
| 273 | | |
|---|
| 274 | | $rs = setfmode($dest_error_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| 275 | | |
|---|
| 276 | | return $rs if ($rs != 0); |
|---|
| | 274 | if ( -e $src_access_file){ |
|---|
| | 275 | |
|---|
| | 276 | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_access_file $dest_access_file"; |
|---|
| | 277 | |
|---|
| | 278 | $rs = sys_command($cmd_cp); |
|---|
| | 279 | |
|---|
| | 280 | return $rs if ($rs != 0); |
|---|
| | 281 | |
|---|
| | 282 | $rs = setfmode($dest_access_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| | 283 | |
|---|
| | 284 | return $rs if ($rs != 0); |
|---|
| | 285 | |
|---|
| | 286 | } |
|---|
| | 287 | |
|---|
| | 288 | if ( -e $src_error_file ){ |
|---|
| | 289 | |
|---|
| | 290 | my $cmd_cp = "$main::cfg{'CMD_CP'} -f $src_error_file $dest_error_file"; |
|---|
| | 291 | |
|---|
| | 292 | $rs = sys_command($cmd_cp); |
|---|
| | 293 | |
|---|
| | 294 | return $rs if ($rs != 0); |
|---|
| | 295 | |
|---|
| | 296 | $rs = setfmode($dest_error_file, $main::cfg{'APACHE_USER'}, $main::cfg{'APACHE_GROUP'}, 0666); |
|---|
| | 297 | |
|---|
| | 298 | return $rs if ($rs != 0); |
|---|
| | 299 | |
|---|
| | 300 | } |
|---|
| 277 | 301 | |
|---|
| 278 | 302 | } |
|---|
|