Fix call to determine if a service is active
This commit is contained in:
parent
cf4116a268
commit
9762b8c2f4
@ -41,7 +41,7 @@ class ServerStart extends Command
|
||||
|
||||
$start = collect();
|
||||
|
||||
if ($o->optionGet(Setup::O_BINKP))
|
||||
if ($o->binkp_active)
|
||||
$start->put('binkp',[
|
||||
'address'=>$o->binkp_bind,
|
||||
'port'=>$o->binkp_port,
|
||||
@ -49,7 +49,7 @@ class ServerStart extends Command
|
||||
'class'=>new Binkp($o),
|
||||
]);
|
||||
|
||||
if ($o->optionGet(Setup::O_EMSI))
|
||||
if ($o->emsi_active)
|
||||
$start->put('emsi',[
|
||||
'address'=>Setup::EMSI_BIND,
|
||||
'port'=>Setup::EMSI_PORT,
|
||||
@ -57,7 +57,7 @@ class ServerStart extends Command
|
||||
'class'=>new EMSI($o),
|
||||
]);
|
||||
|
||||
if ($o->optionGet(Setup::O_DNS))
|
||||
if ($o->dns_active)
|
||||
$start->put('dns',[
|
||||
'address'=>Setup::DNS_BIND,
|
||||
'port'=>Setup::DNS_PORT,
|
||||
|
@ -130,17 +130,17 @@ class Setup extends Model
|
||||
|
||||
/* METHODS */
|
||||
|
||||
public function optionClear(int $key,$index='options'): void
|
||||
public function optionClear(int $key,$index='option_options'): void
|
||||
{
|
||||
$this->{$index} &= ~$key;
|
||||
}
|
||||
|
||||
public function optionGet(int $key,$index='options'): int
|
||||
public function optionGet(int $key,$index='option_options'): int
|
||||
{
|
||||
return ($this->{$index} & $key);
|
||||
}
|
||||
|
||||
public function optionSet(int $key,$index='options'): void
|
||||
public function optionSet(int $key,$index='option_options'): void
|
||||
{
|
||||
$this->{$index} |= $key;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user