diff options
| -rw-r--r-- | contrib/make_combined_log.pl | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/contrib/make_combined_log.pl b/contrib/make_combined_log.pl index 00786de..2c55271 100644 --- a/contrib/make_combined_log.pl +++ b/contrib/make_combined_log.pl | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl |
| 2 | 2 | ||
| 3 | # $Id: make_combined_log.pl,v 1.1 2004/02/12 03:44:12 urkle Exp $ | 3 | # $Id: make_combined_log.pl,v 1.2 2004/02/12 23:32:55 urkle Exp $ |
| 4 | # | 4 | # |
| 5 | # make_combined_log.pl | 5 | # make_combined_log.pl |
| 6 | # | 6 | # |
| @@ -34,14 +34,9 @@ $| = 1; | |||
| 34 | 34 | ||
| 35 | use DBI; | 35 | use DBI; |
| 36 | 36 | ||
| 37 | # Remember, $#ARGV is parameters minus one... | 37 | # Remove the # in front of this line when you have |
| 38 | if ($#ARGV != 1) { | 38 | # edited the variables below. |
| 39 | die "Incorrect usage, please read the perl source code for correct usage." | 39 | #$has_edited_source = 1; |
| 40 | } | ||
| 41 | |||
| 42 | $days = $ARGV[0]; | ||
| 43 | $virthost = $ARGV[1]; | ||
| 44 | |||
| 45 | # | 40 | # |
| 46 | # Set up the proper variables to permit database access | 41 | # Set up the proper variables to permit database access |
| 47 | # | 42 | # |
| @@ -52,6 +47,20 @@ $serverPass = "somepass"; | |||
| 52 | $serverTbl = "acc_log_tbl"; | 47 | $serverTbl = "acc_log_tbl"; |
| 53 | $serverDb = "apache"; | 48 | $serverDb = "apache"; |
| 54 | 49 | ||
| 50 | if (!defined($has_edited_source)) { | ||
| 51 | print "Please edit this file and configure it first.\n"; | ||
| 52 | print "This program is $0\n"; | ||
| 53 | exit 1; | ||
| 54 | } | ||
| 55 | # Remember, $#ARGV is parameters minus one... | ||
| 56 | if ($#ARGV != 1) { | ||
| 57 | print "Usage $0 days virtualhost\n"; | ||
| 58 | exit 1; | ||
| 59 | } | ||
| 60 | |||
| 61 | $days = $ARGV[0]; | ||
| 62 | $virthost = $ARGV[1]; | ||
| 63 | |||
| 55 | # | 64 | # |
| 56 | # Other constants | 65 | # Other constants |
| 57 | # | 66 | # |
| @@ -128,4 +137,3 @@ while (@data = $records->fetchrow_array) { | |||
| 128 | # Done | 137 | # Done |
| 129 | # | 138 | # |
| 130 | $records->finish; | 139 | $records->finish; |
| 131 | |||
