net/wireguard: small changes

This commit is contained in:
Franco Fichtner
2023-08-22 14:56:55 +02:00
parent 86c9e5ccc8
commit dc06d5837f
3 changed files with 5 additions and 5 deletions
@@ -26,8 +26,8 @@
# SUCH DAMAGE.
TMPDIR="/tmp"
GENPRIV="/usr/local/bin/wg genkey"
GENPUB="/usr/local/bin/wg pubkey"
GENPRIV="/usr/bin/wg genkey"
GENPUB="/usr/bin/wg pubkey"
cleanup() {
# Delete old files
@@ -60,7 +60,7 @@ function wg_start($server, $fhandle)
* where these (and maybe other) static routes hook into.
**/
$peers = explode(',', $server->peers);
$routes_to_add = ['inet'=> [], 'inet6' => []];
$routes_to_add = ['inet' => [], 'inet6' => []];
foreach ((new OPNsense\Wireguard\Client())->clients->client->iterateItems() as $key => $client) {
if (empty((string)$client->enabled) || !in_array($key, $peers)) {
continue;
@@ -36,13 +36,13 @@ type:script_output
message:Generating WireGuard keys
[showconf]
command:/usr/local/bin/wg show all
command:/usr/bin/wg show all
parameters:
type:script_output
message:Show WireGuard config
[showhandshake]
command:/usr/local/bin/wg show all latest-handshakes
command:/usr/bin/wg show all latest-handshakes
parameters:
type:script_output
message:Show WireGuard handshakes