jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [worms/] [setup.pl] - Blame information for rev 20

 

Line No. Rev Author Line
11simandl#!/usr/bin/env perl
2 
3# $Id: setup.pl,v 1.6 2004/07/12 07:50:16 bernisys Exp $
4 
5# include PERL libraries
6use strict;
7use warnings;
8use diagnostics;
9 
10# include HotSaNIC libraries
11use lib "../../lib";
12use lib "./platform";
13use HotSaNICparser;
14 
15use HotSaNIClog;
16use common;
17 
18$|=1;
19 
20(my $VERSION = '$Revision: 1.6 $') =~ s/.*(\d+\.\d+).*/$1/;
21(my $IDENTIFIER = '$Id: setup.pl,v 1.6 2004/07/12 07:50:16 bernisys Exp $') =~ s/.*,v (.*) \$/$1/;
22 
23my $MODNAME=HotSaNICparser::get_module_name();
24my %MODCONF=HotSaNICmod::common::configure();
25my $OUTFILE="settings.new";
26if ( ! -e "settings" ) { $OUTFILE="settings"; }
27open OUTFILE,">$OUTFILE" || die "could not open ".HotSaNICparser::get_module_name()." settings file for writing.\n";
28 
29if (@{$MODCONF{ITEM}}) { $MODCONF{ITEM}="ITEM=\"".join("\"\nITEM=\"",@{$MODCONF{ITEM}})."\""; }
30else { $MODCONF{ITEM}=""; }
31 
32print OUTFILE "# SHORT DESCRIPTION
33# full path to the httpd logfile directory
34# LOGPATH=\"/var/log/httpd\"
35#
36LOGPATH=\"$MODCONF{LOGPATH}\"
37 
38# name of the httpd access logfiles
39# LOGNAME=\"access_log\"
40#
41LOGNAME=\"$MODCONF{LOGNAME}\"
42 
43# query-time in seconds
44# INTERVAL=600
45#
46INTERVAL=\"$MODCONF{INTERVAL}\"
47 
48# list items to query from HTTPD logfile
49# ITEM=<string>:<description>
50#
51$MODCONF{ITEM}
52";
53 
54close OUTFILE;
55 
56if ($OUTFILE eq "settings.new") {
57 HotSaNICparser::backup_file("settings");
58 rename "settings.new","settings";
59 }
60 
61print "Please check the settings file and adapt it to satisfy your needs.\n";
62 

Powered by WebSVN 2.2.1