Closed MayNiklas closed 3 years ago
Option 3 worked like a charm.
Just tried to set it up using the Readme and it did not work. Thankfully you posted this here!
+1 would move to main Read me for future users.
I was having this same issue, and creating the systemd service worked like a charm. Thanks.
I had the same issue but with the systemd run perfect. Thank you @MayNiklas !
I added the startup configuration into my PR https://github.com/dr-mod/zero-btc-screen/pull/7
Added to README
Hey @dr-mod , I've noticed something and thought of a better way solving autostart:
Following the README, I wasn't able to get the skript to autostart.
In
/etc/rc.local
you are using/usr/bin/python3 /home/pi/zero-btc-screen/main.py&
. -> it won't work, because the skript is being executed from the wrong directory (e.g. the font is missing).There are 3 ways we could easily solve this:
cd
into the right folder (we also could use ´crontab's @reboot' instead of usingrc.local
I personally think, that systmd would be the cleanest way to solve this: we would have a autorestart in case something would go wrong and we also would receive logs!
Implementing this would be really simple:
Then we would insert the following content:
To start & enable our newly created service:
In case you think this would be a great idea, I would love to add it to the README.md. But before I do so: is this even wanted? We also could provide a sample .service file, the user could easily copy into the right folder without manually creating it.
King regards, Niki