mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/wireguard: small changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user