summaryrefslogtreecommitdiff
path: root/network/awstats/patches/awstats_configure.pl.patch
blob: 3f8995ca5adc4b4ccec0eaa6d98dbfde2070cefb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- tools/awstats_configure.pl.orig	2013-11-06 23:39:01.487947740 -0600
+++ tools/awstats_configure.pl	2013-11-07 07:17:47.975586091 -0600
@@ -28,11 +28,11 @@
 $AWSTATS_MODEL_CONFIG
 $AWSTATS_DIRDATA_PATH
 /;
-$AWSTATS_PATH='';
-$AWSTATS_ICON_PATH='/usr/local/awstats/wwwroot/icon';
-$AWSTATS_CSS_PATH='/usr/local/awstats/wwwroot/css';
-$AWSTATS_CLASSES_PATH='/usr/local/awstats/wwwroot/classes';
-$AWSTATS_CGI_PATH='/usr/local/awstats/wwwroot/cgi-bin';
+$AWSTATS_PATH='@DOCROOT@/awstats';
+$AWSTATS_ICON_PATH='$AWSTATS_PATH/wwwroot/icon';
+$AWSTATS_CSS_PATH='$AWSTATS_PATH/wwwroot/css';
+$AWSTATS_CLASSES_PATH='$AWSTATS_PATH/wwwroot/classes';
+$AWSTATS_CGI_PATH='$AWSTATS_PATH/wwwroot/cgi-bin';
 $AWSTATS_MODEL_CONFIG='/etc/awstats/awstats.model.conf';		# Used only when configure ran on linux
 $AWSTATS_DIRDATA_PATH='/var/lib/awstats';						# Used only when configure ran on linux
 
@@ -306,7 +306,7 @@
 print "\n-----> Running OS detected: $OSLib{$OS}\n";
 
 if ($OS eq 'linux') {
-	$AWSTATS_PATH=`pwd`; $AWSTATS_PATH =~ s/[\r\n]//;
+	$AWSTATS_PATH =~ s/[\r\n]//;
 	$AWSTATS_PATH=~s/tools[\\\/]?$//;
 	$AWSTATS_PATH=~s/[\\\/]$//;
 	if ($AWSTATS_PATH ne '/usr/local/awstats') {
@@ -660,6 +660,12 @@
     		print "\n-----> Restart Web server with '$command'\n";
 	 	    my $ret=`$command`;
 	 	    print "$ret";
+	} if (-f "/etc/slackware-version") {
+	    # We are on Slackware :)
+		my $command="/etc/rc.d/rc.httpd restart";
+		print "\n-----> Restart Web server with '$command'\n";
+		    my $ret=`$command`;
+		    print "$ret";
         } elsif (-x "/sbin/service") {
             # We are not on debian
        	 	my $command="/sbin/service httpd restart";