From 753126a39c61a8e7e9e97e84c39dae84644c9954 Mon Sep 17 00:00:00 2001 From: Marc Miller Date: Tue, 7 Apr 2020 23:37:19 -0400 Subject: [PATCH] updated run.py to fix behavior when run remotely (i.e. init.d scripts) --- run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index 26ffe44..b4e3dd2 100755 --- a/run.py +++ b/run.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 import os -import pathlib -root_folder = pathlib.Path().absolute() +file_path = os.path.abspath(__file__) +root_folder = os.path.dirname(file_path) if not os.path.isdir(os.path.join(root_folder, "dashmachine", "user_data")): os.mkdir(os.path.join(root_folder, "dashmachine", "user_data")) db_file_path = os.path.join(root_folder, "dashmachine", "user_data", "site.db")