Kea / Dhcp - DHCPv4 replacement, missing service validation for https://github.com/opnsense/core/issues/6971

This commit is contained in:
Ad Schellevis 2023-11-07 16:13:40 +01:00
parent b787a35c8e
commit b25ea1c4b8

View File

@ -28,16 +28,20 @@
function kea_services()
{
$services[] = [
'description' => gettext('KEA DHCPv4 server'),
'pidfile' => '/var/run/kea/kea-dhcp4.kea-dhcp4.pid',
'configd' => [
'restart' => ['kea restart'],
'start' => ['kea start'],
'stop' => ['kea stop'],
],
'name' => 'kea-dhcpv4',
];
$services = [];
if (!empty((string)(new \OPNsense\Kea\KeaDhcpv4())->general->enabled)) {
$services[] = [
'description' => gettext('KEA DHCPv4 server'),
'pidfile' => '/var/run/kea/kea-dhcp4.kea-dhcp4.pid',
'configd' => [
'restart' => ['kea restart'],
'start' => ['kea start'],
'stop' => ['kea stop'],
],
'name' => 'kea-dhcpv4',
];
}
return $services;
}