aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install-systemd.bash18
-rw-r--r--src/service/watcher.service2
2 files changed, 19 insertions, 1 deletions
diff --git a/install-systemd.bash b/install-systemd.bash
new file mode 100644
index 0000000..546dba3
--- /dev/null
+++ b/install-systemd.bash
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+sudo cp -r ./src/Watcher /usr/share/
+mkdir -p ~/.local/bin/
+cp -r ./src/bin/watcher ~/.local/bin/
+sudo chmod +x ~/.local/bin/watcher
+
+# enabling systemd service
+mkdir -p ~/.config/systemd/
+mkdir -p ~/.config/systemd/user/
+cp -r ./src/service/watcher.service ~/.config/systemd/user/
+systemctl --user enable --now watcher.service
+
+# making directory for log-files (where all you daily logs are stored)
+mkdir -p ~/.cache/Watcher/
+mkdir -p ~/.cache/Watcher/raw_data/
+mkdir -p ~/.cache/Watcher/Analysis/
+
diff --git a/src/service/watcher.service b/src/service/watcher.service
index 90bd2a8..50e764b 100644
--- a/src/service/watcher.service
+++ b/src/service/watcher.service
@@ -2,7 +2,7 @@
Description=Get the perspective from Watcher about your Screen-Time
[Service]
-ExecStart=/bin/python /usr/share/Watcher/watch_log.py
+ExecStart=/bin/python3 /usr/share/Watcher/watch_log.py
Type=simple
Restart=on-failure