wireguard reload config without restart

This commit is contained in:
mercury
2023-05-25 16:28:11 +04:00
parent a9ab696b65
commit de03769236
+1 -2
View File
@@ -2297,9 +2297,8 @@ DNS-over-HTTPS with IP:
public function restartWG($conf_str)
{
$this->ssh("wg-quick down wg0");
$this->ssh("echo '$conf_str' > /etc/wireguard/wg0.conf");
$this->ssh("wg-quick up wg0");
$this->ssh("wg syncconf wg0 <(wg-quick strip wg0)");
return true;
}