Merge pull request #114 from marcjmiller/fixRunPyForRemoteExecution

updated run.py to fix behavior when run remotely (i.e. init.d scripts)
This commit is contained in:
sportivaman 2020-04-12 13:57:13 -04:00 committed by GitHub
commit aaf8913de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
run.py
View File

@ -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")