From af6e201bef4a3e0c42cdb8fd83ceb01b761c4cff Mon Sep 17 00:00:00 2001 From: Waishnav Date: Sun, 13 Mar 2022 13:29:46 +0530 Subject: fixing issues in install-systemd.bash --- install-systemd.bash | 18 ++++++++++++++++++ src/service/watcher.service | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 install-systemd.bash 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 -- cgit v1.2.3