aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Weth <git@jonathanweth.de>2020-07-30 15:54:06 +0200
committerJonathan Weth <git@jonathanweth.de>2020-07-30 15:54:06 +0200
commit367a88ffa591219f6e7028a6a544e521531dee8f (patch)
tree6be43e1e18893fd07c753fda8d2e6642301980ab
parentab8103f73e419fc0da924ee7ea5f275e1ece76d7 (diff)
downloadRWA.Support.SessionService-367a88ffa591219f6e7028a6a544e521531dee8f.tar.gz
RWA.Support.SessionService-367a88ffa591219f6e7028a6a544e521531dee8f.tar.bz2
RWA.Support.SessionService-367a88ffa591219f6e7028a6a544e521531dee8f.zip
Store lock file in own directory in /tmp/
-rwxr-xr-xservice.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/service.py b/service.py
index 7a36235..339008e 100755
--- a/service.py
+++ b/service.py
@@ -233,7 +233,9 @@ def str2bool(v: Union[str, bool, int]) -> bool:
if __name__ == "__main__":
- lock_file_path = os.path.join(tempfile.gettempdir(), "rwa-session-service.lock")
+ lock_dir_path = os.path.join(tempfile.gettempdir(), "rwa-session-service")
+ os.makedirs(lock_dir_path, exist_ok=True)
+ lock_file_path = os.path.join(lock_dir_path, "rwa-session-service.lock")
# Check for lock file
if os.path.exists(lock_file_path):