Skip to content

Commit

Permalink
Start Apache no matter what init system
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Aug 19, 2017
1 parent 7f346c0 commit a9aa544
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/Virtualmin/Config/Plugin/AWStats.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ sub new {
my ($class, %args) = @_;

# inherit from Plugin
my $self
= $class->SUPER::new(name => 'AWStats', %args);
my $self = $class->SUPER::new(name => 'AWStats', %args);

return $self;
}
Expand Down
8 changes: 6 additions & 2 deletions lib/Virtualmin/Config/Plugin/Apache.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ sub actions {
eval {
foreign_require("init", "init-lib.pl");
foreign_require("apache", "apache-lib.pl");
if (-e "/etc/init.d/httpd") { init::enable_at_boot("httpd"); }
elsif (-e "/etc/init.d/apache2") { init::enable_at_boot("apache2"); }
if (-e "/etc/init.d/httpd" or -e "/etc/httpd/conf/httpd.conf") {
init::enable_at_boot("httpd");
}
elsif (-e "/etc/init.d/apache2" or -e "/etc/apache2/apache2.conf") {
init::enable_at_boot("apache2");
}
elsif (-e "/usr/local/etc/rc.d/apache22") {
init::enable_at_boot("apache22");
}
Expand Down

0 comments on commit a9aa544

Please sign in to comment.