root/trunk/hldfilter/install.pl

Revision 32, 2.4 KB (checked in by wombat, 9 years ago)

Fixed checkuser bug

Line 
1#!/usr/bin/perl -w
2
3use strict;
4use CPAN;
5
6
7###########################################################################
8#
9#      Copyright Dan Cardamore <wombat@hld.ca> 2000 - 2001
10#      This program is licensed under the GNU GPL.  Since this is free
11#      software, the author assumes no liability for it and the damages
12#      that it may cause.
13#
14#      Please read the README file.
15#      http://www.hld.ca/opensource/hldfilter
16#
17###########################################################################
18#   $rcs = ' $Id: install.pl,v 3.1 2001/06/01 17:35:32 wombat Exp $ ' ;
19###########################################################################
20
21print <<START;
22Please make sure you are running this program as root since
23if you are not, this install will not succeed.
24
25This will first attempt to download all required modules, and
26then it will copy the files hldfilter and statsgen.pl into
27/usr/local/bin where all users will be able to access them.
28
29Please make sure that /usr/local/bin is in the system path.
30START
31
32sleep 3;
33
34my @modules = (
35        "Mail::Audit",
36        "Mail::Address",
37        "Mail::RBL",
38        "Mail::CheckUser",
39        "MIME::Lite",
40        "Getopt::Long",
41        "Date::Manip",
42        "GD::Graph",
43        "GD::pie",
44        "GD::bars"
45        );
46
47print "Copying HLDFilter files into /usr/local/bin...\n";
48`cp hldfilter /usr/local/bin`;
49`chmod 755 /usr/local/bin/hldfilter`;
50`cp statsgen.pl /usr/local/bin/`;
51`chmod 755 /usr/local/bin/statsgen.pl`;
52
53my $status = 1;
54foreach my $module (@modules) {
55    print "Installing $module...\n";
56    unless (install($module)) { $status = undef; }
57}
58
59print "\n\n";
60if ($status) {
61    print "All modules installed successfully!\n";
62}
63else {
64    print "Some module installs failed.\n";
65}
66sleep 2;
67
68
69print <<END;
70Installation of modules is complete.  If any errors occured, you
71will have to install those yourself either by downloading them and
72installing them yourself from www.cpan.org, or by using cpan:
73perl -MCPAN -e shell
74
75You will also be required to ensure that the path to perl at the
76very top line of both /usr/local/bin/hldfilter and
77/usr/local/bin/statsgen.pl is correct.  You can find this path by
78typing 'which perl' at the command line.
79
80To get started filtering, type 'hldfilter --init' to set a user up.
81
82If you have problems with hldfilter, please join one of the
83mailing lists located at http://www.hld.ca/opensource/hldfilter
84END
85
86
87
Note: See TracBrowser for help on using the browser.