summaryrefslogtreecommitdiffstats
path: root/contrib/make_combined_log.pl
diff options
context:
space:
mode:
authorGravatar Edward Rudd 2004-02-12 23:32:55 +0000
committerGravatar Edward Rudd 2004-02-12 23:32:55 +0000
commit8816d3b3de90cd6b1c2f14ea3aaa4827392d9933 (patch)
treef0436815149802f8303dd92be0d4a2e0b0152fec /contrib/make_combined_log.pl
parenteee7a95a0e6922e808f1b02996c688b3b1b1477e (diff)
Updated help and added check and error to make sure the user edited the file first.
Diffstat (limited to 'contrib/make_combined_log.pl')
-rw-r--r--contrib/make_combined_log.pl28
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
35use DBI; 35use DBI;
36 36
37# Remember, $#ARGV is parameters minus one... 37# Remove the # in front of this line when you have
38if ($#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
50if (!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...
56if ($#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