mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Check if init module available before using
This commit is contained in:
@@ -2401,7 +2401,8 @@ sub reload_miniserv
|
||||
{
|
||||
my ($ignore) = @_;
|
||||
return undef if (&is_readonly_mode());
|
||||
if (&has_command('systemctl')) {
|
||||
if (&has_command('systemctl') &&
|
||||
&foreign_available("init")) {
|
||||
&foreign_require("init");
|
||||
my $unit_target =
|
||||
&get_product_name() eq 'usermin' ?
|
||||
|
||||
Reference in New Issue
Block a user