Mercurial > libervia-backend
changeset 4171:da7d360a87be
core (constants): user platform temporary dir by default for PID files
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 04 Dec 2023 17:51:28 +0100 |
parents | b47f21f2b8fa |
children | 0e48181d50ab |
files | libervia/backend/core/constants.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/backend/core/constants.py Fri Dec 01 18:23:04 2023 +0100 +++ b/libervia/backend/core/constants.py Mon Dec 04 17:51:28 2023 +0100 @@ -22,7 +22,9 @@ except ImportError: BaseDirectory = None from os.path import dirname +import tempfile from typing import Final + from libervia import backend @@ -482,7 +484,7 @@ ).getAbsolutePath(), Const.APP_NAME_FILE, ), - "pid_dir": "%(local_dir)s", + "pid_dir": tempfile.gettempdir(), "log_dir": "%(local_dir)s", } Const.CONFIG_FILES = [ @@ -525,7 +527,7 @@ "media_dir": "/usr/share/" + Const.APP_NAME_FILE + "/media", "local_dir": BaseDirectory.save_data_path(Const.APP_NAME_FILE), "downloads_dir": "~/Downloads/" + Const.APP_NAME_FILE, - "pid_dir": "%(local_dir)s", + "pid_dir": tempfile.gettempdir(), "log_dir": "%(local_dir)s", }