This commit is contained in:
Дмитрий Абдрахманов 2024-10-18 17:58:47 +03:00
parent c5bc686aca
commit bd9512d369
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
[Unit]
Description=Weather collection service
[Service]
Type=simple
WorkingDirectory=/home/citrullux/ModernOSLabs/src

View File

@ -19,8 +19,8 @@ def install() -> None:
# Fix for weather service
with open(os.path.join(projectDir, "services/wthrc.service"), "r") as service:
lines = service.readlines()
lines[5] = "WorkingDirectory=" + os.path.join(projectDir, "src") + "\n"
lines[6] = (
lines[6] = "WorkingDirectory=" + os.path.join(projectDir, "src") + "\n"
lines[7] = (
"ExecStart=" + pythonPath + " " + os.path.join(projectDir, "src/main.py") + "\n"
)
with open(os.path.join(projectDir, "services/wthrc.service"), "w") as service: