net/wireguard - replace setconf with syncconf in service control for more fluent reloading. (https://github.com/opnsense/plugins/pull/3358)

This commit is contained in:
Ad Schellevis
2023-11-07 18:24:51 +01:00
parent 85e4a256df
commit 7a7b5a5c9c
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -1,5 +1,6 @@
PLUGIN_NAME= wireguard
PLUGIN_VERSION= 2.5
PLUGIN_REVISION= 1
PLUGIN_COMMENT= WireGuard VPN service kernel implementation
PLUGIN_DEPENDS= wireguard-kmod
PLUGIN_CONFLICTS= wireguard-go
@@ -67,7 +67,7 @@ function wg_start($server, $fhandle, $ifcfgflag = 'up')
mwexecf('/sbin/ifconfig wg create name %s', [$server->interface]);
mwexecf('/sbin/ifconfig %s group wireguard', [$server->interface]);
}
mwexecf('/usr/bin/wg setconf %s %s', [$server->interface, $server->cnfFilename]);
mwexecf('/usr/bin/wg syncconf %s %s', [$server->interface, $server->cnfFilename]);
/* The tunneladdress can be empty, so array_filter without callback filters empty strings out. */
foreach (array_filter(explode(',', (string)$server->tunneladdress)) as $alias) {