C2N14 / AutomaThemely

Simple, set-and-forget python application for changing between desktop themes according to light and dark hours
GNU General Public License v3.0
205 stars 31 forks source link

updsuntimes.py gets the wrong execution folder #28

Closed mijorus closed 4 years ago

mijorus commented 4 years ago

hi, i just noticed my automathemely still wasnt running automatically as expected, and i found this:

[Unit]
Description=Update automathemely sun times daily
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
ExecStart=/bin/bash /automathemely/bin/systemd-trigger.sh "/.config/automathemely/sun_times" "/usr/bin/env python3 /automathemely/autoth_tools/updsuntimes.py"

this is my automathemely.service file, which is not configured properly (i run the post-install script as expected)

it is looking of files in the root directory, while my folder should be /home/{USER}/Automathemely/automathemely

because i compiled from source. My skills are limited, so i dont know how to fix this problem in the source file, so i've just entered the right path. hope this can help

C2N14 commented 4 years ago

sun-times.service is meant to run systemd-trigger.sh daily, which is in the binaries directory not on the user folder. This should look like /usr/lib/python3.**X**/dist-packages/automathemely/bin/systemd-trigger.sh.

If still relevant, what is the output of running $(python3 -m pip show automathemely | grep -oP "^Location: \K.*")/automathemely?

mijorus commented 4 years ago

Long time has gone, I cant help anymore as I moved to Arch and install the package directly from AUR. However, the installation on ubuntu was a real pain, as mismatching python version were pre-installed. I remember it was looking for python 3.7 while ubuntu had 3.6.8 in their repo....