Fix to use API to check for command
This commit is contained in:
parent
bae4af7490
commit
5462c3bbf8
@ -64,7 +64,7 @@ sub run
|
||||
};
|
||||
root($o->{'config'}, \&$conf_check);
|
||||
my $service = ($o->{'config'} =~ /usermin/ ? 'usermin' : 'webmin');
|
||||
my $systemctlcmd = `which systemctl`;
|
||||
my $systemctlcmd = &has_command('systemctl');
|
||||
$systemctlcmd =~ s/\s+$//;
|
||||
if ($o->{'cmd'} =~ /^(start|stop|restart|reload)$/) {
|
||||
my $rs = system("$o->{'config'}/$o->{'cmd'} $service");
|
||||
|
Loading…
x
Reference in New Issue
Block a user