mirror of
https://github.com/webmin/webmin.git
synced 2026-08-06 07:50:40 +01:00
Don't try to run apachectl if path is not defined http://virtualmin.com/node/31403
This commit is contained in:
@@ -1753,13 +1753,16 @@ foreach $l (&find_directive_struct("LoadModule", $conf)) {
|
||||
undef(@get_config_cache); # Cache is no longer valid
|
||||
|
||||
# Add dynamically loaded modules
|
||||
&open_execute_command(APACHE, "$config{'apachectl_path'} -M 2>/dev/null", 1);
|
||||
while(<APACHE>) {
|
||||
if (/(\S+)_module/ && -r "$module_root_directory/mod_${1}.pl") {
|
||||
push(@rv, "mod_${1}");
|
||||
if ($config{'apachectl_path'}) {
|
||||
&open_execute_command(APACHE,
|
||||
"$config{'apachectl_path'} -M 2>/dev/null", 1);
|
||||
while(<APACHE>) {
|
||||
if (/(\S+)_module/ && -r "$module_root_directory/mod_${1}.pl") {
|
||||
push(@rv, "mod_${1}");
|
||||
}
|
||||
}
|
||||
close(APACHE);
|
||||
}
|
||||
close(APACHE);
|
||||
|
||||
return &unique(@rv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user