diff libervia/backend/core/launcher.py @ 4202:b26339343076

core: use a user specific directory for PID file: default location of pid file is now specific to logged user, this allow to run several instances of Libervia by different users on the same machine without PID conflicts.
author Goffi <goffi@goffi.org>
date Sun, 14 Jan 2024 17:48:02 +0100
parents 3dbaf179c50d
children
line wrap: on
line diff
--- a/libervia/backend/core/launcher.py	Thu Dec 14 09:19:32 2023 +0100
+++ b/libervia/backend/core/launcher.py	Sun Jan 14 17:48:02 2024 +0100
@@ -197,6 +197,7 @@
 
     def get_pid_file(self, config):
         pid_dir = Path(config.get("DEFAULT", "pid_dir")).expanduser()
+        pid_dir.mkdir(parents=True, exist_ok=True)
         return pid_dir / f"{self.APP_NAME_FILE}.pid"
 
     def wait_for_service(