From 71ee784003b365b81f0752939564b719ddcfe503 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 23 Nov 2024 17:51:48 +0800 Subject: [PATCH] Update dashboard.py --- src/dashboard.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dashboard.py b/src/dashboard.py index 1d23333..d057ec5 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -973,14 +973,13 @@ class WireguardConfiguration: self.getStatus() if self.Status: try: - check = subprocess.check_output(f"wg-quick down {self.Name}", + check = subprocess.call(f"wg-quick down {self.Name}", shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as exc: return False, str(exc.output.strip().decode("utf-8")) else: try: - check = subprocess.check_output(f"wg-quick up {self.Name}", - shell=True, stderr=subprocess.STDOUT) + check = subprocess.call(f"wg-quick up {self.Name}", shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as exc: return False, str(exc.output.strip().decode("utf-8")) self.getStatus()