mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-01-12 05:26:18 +00:00
Update WireguardConfiguration.py
This commit is contained in:
@@ -847,12 +847,14 @@ class WireguardConfiguration:
|
|||||||
try:
|
try:
|
||||||
check = subprocess.check_output(f"{self.Protocol}-quick down {self.Name}",
|
check = subprocess.check_output(f"{self.Protocol}-quick down {self.Name}",
|
||||||
shell=True, stderr=subprocess.STDOUT)
|
shell=True, stderr=subprocess.STDOUT)
|
||||||
|
print(check.decode())
|
||||||
self.removeAutostart()
|
self.removeAutostart()
|
||||||
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"{self.Protocol}-quick up {self.Name}", shell=True, stderr=subprocess.STDOUT)
|
check = subprocess.check_output(f"{self.Protocol}-quick up {self.Name}", shell=True, stderr=subprocess.STDOUT)
|
||||||
|
print(check.decode())
|
||||||
self.addAutostart()
|
self.addAutostart()
|
||||||
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"))
|
||||||
|
|||||||
Reference in New Issue
Block a user