diff --git a/uncloud_net/tasks.py b/uncloud_net/tasks.py index 67cfa18..7d94f3b 100644 --- a/uncloud_net/tasks.py +++ b/uncloud_net/tasks.py @@ -25,7 +25,7 @@ def configure_wireguard_server_on_host(wg_name, config): fd.write(config) # Ensure the device exists - subprocess.run(f"ip link show {wg_name} || sudo ip link add {{wg_name}} type wireguard", + subprocess.run(f"ip link show {wg_name} >/dev/null || sudo ip link add {{wg_name}} type wireguard", shell=True, check=True) # Ensure the config is correct