wireguard reload config without restart
This commit is contained in:
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user