]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Added an installer.
authoreldy <>
Fri, 21 Nov 2003 19:39:10 +0000 (19:39 +0000)
committereldy <>
Fri, 21 Nov 2003 19:39:10 +0000 (19:39 +0000)
tools/configure.pl

index bdab34c3306feab41263fc783596bbc365e3eb69..9722ef0b1683bcf084fa7f730ef457829dc6f87d 100644 (file)
@@ -276,7 +276,6 @@ print "log files without web server, to analyze mail or ftp log files, or need\n
 print "to manage rotated logs, you will have to complete the config file manually\n";
 print "according to your needs.\n";
 print "Read the AWStats documentation (docs/index.html).\n";
-print "\n";
 
 # Detect web server path
 # ----------------------
@@ -457,6 +456,7 @@ if ($bidon =~ /^y/i) {
        print "What is the name of your web site or profile analysis ?\n";
        print "Example: www.mysite.com\n";
        print "Example: demo\n";
+       ASKCONFIG:
        my $bidon='';
        while (! $bidon) {
                print "Your web site, virtual server or profile name: ";
@@ -470,6 +470,11 @@ if ($bidon =~ /^y/i) {
        my $configfile='';
        if ($OS eq 'linux')     { $configfile="/etc/awstats/awstats.$site.conf"; }
        if ($OS eq 'windows')   { $configfile="$AWSTATS_PATH\\wwwroot\\cgi-bin\\awstats.$site.conf"; }
+
+       if (-s "$configfile") {
+               print "Warning: A config file for this name already exists. Choose another one.\n";
+               goto ASKCONFIG; 
+       }
        
        # Create awstats.conf file
        # ------------------------