mirror of
https://github.com/donaldzou/WGDashboard
synced 2025-02-26 05:58:47 +00:00
Update dashboard.py
This commit is contained in:
parent
597528e9b7
commit
71ee784003
@ -973,14 +973,13 @@ class WireguardConfiguration:
|
|||||||
self.getStatus()
|
self.getStatus()
|
||||||
if self.Status:
|
if self.Status:
|
||||||
try:
|
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)
|
shell=True, stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
return False, str(exc.output.strip().decode("utf-8"))
|
return False, str(exc.output.strip().decode("utf-8"))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
check = subprocess.check_output(f"wg-quick up {self.Name}",
|
check = subprocess.call(f"wg-quick up {self.Name}", shell=True, stderr=subprocess.STDOUT)
|
||||||
shell=True, stderr=subprocess.STDOUT)
|
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
return False, str(exc.output.strip().decode("utf-8"))
|
return False, str(exc.output.strip().decode("utf-8"))
|
||||||
self.getStatus()
|
self.getStatus()
|
||||||
|
Loading…
Reference in New Issue
Block a user