]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fix: Restart of apache on debian failed in awstats_configure.pl
authoreldy <>
Sat, 15 Jan 2005 22:42:58 +0000 (22:42 +0000)
committereldy <>
Sat, 15 Jan 2005 22:42:58 +0000 (22:42 +0000)
tools/awstats_configure.pl

index 71a8adc220c35499c1aa342e15964d7dbfd7b24b..8158822a32d05e8e227a9866115a2c782ef0e064 100644 (file)
@@ -652,15 +652,21 @@ if ($bidon =~ /^y/i) {
 # ----------------------------------
 if ($WebServerChanged) {
        if ($OS eq 'linux')     {
-               my $command="/sbin/service";
-               if (-x $command) {
-               print "\n-----> Restart Web server with '/sbin/service httpd restart'\n";
-                   my $ret=`/sbin/service httpd restart`;
+        if (-f "/etc/debian_version") {
+            # We are on debian
+                       my $command="/etc/init.d/apache restart";
+               print "\n-----> Restart Web server with '$command'\n";
+                   my $ret=`$command`;
                    print "$ret";
-               }
-               else {
-               print "\n-----> Don't forget to restart manually your web server\n";
-               }
+        } elsif (-x "/sbin/service") {
+            # We are not on debian
+                       my $command="/sbin/service httpd restart";
+               print "\n-----> Restart Web server with '$command'\n";
+                   my $ret=`$command`;
+                   print "$ret";
+               } else {
+                       print "\n-----> Don't forget to restart manually your web server\n";
+        }
        }
        elsif ($OS eq 'macosx') {
                print "\n-----> Restart Web server with '/usr/sbin/apachectl restart'\n";