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:
commit
aaf8913de3
4
run.py
4
run.py
@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
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")):
|
if not os.path.isdir(os.path.join(root_folder, "dashmachine", "user_data")):
|
||||||
os.mkdir(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")
|
db_file_path = os.path.join(root_folder, "dashmachine", "user_data", "site.db")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user