Skip to content

Commit

Permalink
src: style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Apr 16, 2024
1 parent 29e87aa commit ac1d9d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/opnsense/mvc/app/models/OPNsense/Kea/KeaCtrlAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

class KeaCtrlAgent extends BaseModel
{
public function generateConfig($target='/usr/local/etc/kea/kea-ctrl-agent.conf')
public function generateConfig($target = '/usr/local/etc/kea/kea-ctrl-agent.conf')
{
$cnf = [
'Control-agent' => [
Expand All @@ -42,15 +42,15 @@ public function generateConfig($target='/usr/local/etc/kea/kea-ctrl-agent.conf')
'control-sockets' => [
'dhcp4' => [
'socket-type' => 'unix',
'socket-name' => '/var/run/kea4-ctrl-socket'
'socket-name' => '/var/run/kea4-ctrl-socket',
],
'dhcp6' => [
'socket-type' => 'unix',
'socket-name'=> '/var/run/kea6-ctrl-socket'
'socket-name' => '/var/run/kea6-ctrl-socket',
],
'd2' => [
'socket-type' => 'unix',
'socket-name' => '/var/run/kea-ddns-ctrl-socket'
'socket-name' => '/var/run/kea-ddns-ctrl-socket',
]
],
'loggers' => [
Expand All @@ -62,11 +62,12 @@ public function generateConfig($target='/usr/local/etc/kea/kea-ctrl-agent.conf')
]
],
'severity' => 'INFO',
'debuglevel' => 0
'debuglevel' => 0,
]
]
]
];

File::file_put_contents($target, json_encode($cnf, JSON_PRETTY_PRINT), 0600);
}
}
10 changes: 5 additions & 5 deletions src/opnsense/mvc/app/models/OPNsense/Kea/KeaDhcpv4.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private function getConfigSubnets()
return $result;
}

public function generateConfig($target='/usr/local/etc/kea/kea-dhcp4.conf')
public function generateConfig($target = '/usr/local/etc/kea/kea-dhcp4.conf')
{
$cnf = [
'Dhcp4' => [
Expand All @@ -178,7 +178,7 @@ public function generateConfig($target='/usr/local/etc/kea/kea-dhcp4.conf')
],
'lease-database' => [
'type' => 'memfile',
'persist' => True
'persist' => true,
],
'control-socket' => [
'socket-type' => 'unix',
Expand All @@ -192,10 +192,10 @@ public function generateConfig($target='/usr/local/etc/kea/kea-dhcp4.conf')
'output' => 'syslog'
]
],
'severity' => 'INFO'
'severity' => 'INFO',
]
],
'subnet4' => $this->getConfigSubnets()
'subnet4' => $this->getConfigSubnets(),
]
];
if (!empty((string)(new KeaCtrlAgent())->general->enabled)) {
Expand All @@ -215,7 +215,7 @@ public function generateConfig($target='/usr/local/etc/kea/kea-dhcp4.conf')
'max-response-delay' => 60000,
'max-ack-delay' => 5000,
'max-unacked-clients' => 5,
'sync-timeout' => 60000
'sync-timeout' => 60000,
]
]
]
Expand Down

0 comments on commit ac1d9d7

Please sign in to comment.