|
|
@ -108,10 +108,7 @@ def restart_interface(server: schemas.WGServer): |
|
|
|
def is_running(server: schemas.WGServer): |
|
|
|
try: |
|
|
|
output = _run_wg(server, ["show", server.interface]) |
|
|
|
if output is None or b'Unable to access interface: No such device' in output: |
|
|
|
_LOGGER.warning("Unable to access interface: No such device. (%s)" |
|
|
|
"This may indicate that there is a bug somewhere, " |
|
|
|
"or that you have manually deleted parts of the database", server.interface) |
|
|
|
if output is None: |
|
|
|
return False |
|
|
|
except Exception as e: |
|
|
|
if b'No such device' in e.output: |
|
|
|