diff options
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/cleanup/__init__.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/kvmd/apps/cleanup/__init__.py b/kvmd/apps/cleanup/__init__.py index 39bd7a71..632f258e 100644 --- a/kvmd/apps/cleanup/__init__.py +++ b/kvmd/apps/cleanup/__init__.py @@ -63,9 +63,15 @@ def main(argv: Optional[List[str]]=None) -> None: except subprocess.CalledProcessError: pass - unix_path = config.server.unix - if unix_path and os.path.exists(unix_path): - logger.info("Removing socket %r ...", unix_path) - os.remove(unix_path) + for (owner, unix_path) in [ + ("KVMD", config.server.unix), + ("streamer", config.streamer.unix), + ]: + if unix_path and os.path.exists(unix_path): + logger.info("Removing %s socket %r ...", owner, unix_path) + try: + os.remove(unix_path) + except Exception: + logger.exception("Can't remove %s socket %r", owner, unix_path) logger.info("Bye-bye") |