mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-01-11 21:16:20 +00:00
Update WireguardConfiguration.py
This commit is contained in:
@@ -847,12 +847,14 @@ class WireguardConfiguration:
|
||||
try:
|
||||
check = subprocess.check_output(f"{self.Protocol}-quick down {self.Name}",
|
||||
shell=True, stderr=subprocess.STDOUT)
|
||||
print(check.decode())
|
||||
self.removeAutostart()
|
||||
except subprocess.CalledProcessError as exc:
|
||||
return False, str(exc.output.strip().decode("utf-8"))
|
||||
else:
|
||||
try:
|
||||
check = subprocess.check_output(f"{self.Protocol}-quick up {self.Name}", shell=True, stderr=subprocess.STDOUT)
|
||||
print(check.decode())
|
||||
self.addAutostart()
|
||||
except subprocess.CalledProcessError as exc:
|
||||
return False, str(exc.output.strip().decode("utf-8"))
|
||||
|
||||
Reference in New Issue
Block a user