From: eldy <> Date: Sat, 15 Jan 2005 22:42:58 +0000 (+0000) Subject: Fix: Restart of apache on debian failed in awstats_configure.pl X-Git-Tag: AWSTATS_6_3_RELEASE~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=166e9caa4eb634a4add40b410b2e6b29462de4e4;p=thirdparty%2FAWStats.git Fix: Restart of apache on debian failed in awstats_configure.pl --- diff --git a/tools/awstats_configure.pl b/tools/awstats_configure.pl index 71a8adc2..8158822a 100644 --- a/tools/awstats_configure.pl +++ b/tools/awstats_configure.pl @@ -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";