VPN: 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:22:59 +01:00
parent b25ea1c4b8
commit 08fa5350bc

View File

@ -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) {