Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3831

Troubleshooting • Re: Issue with systemd on Rpi

$
0
0
First, remove USER=pi from your service file.
Don't use sudo in your service file.
Create a shell script (say /home/pi/bin/start_BTC_miners.sh) and put your complex command it it (without sudo).Make it executable.
Test it with: sudo /home/pi/bin/start_BTC_miners.sh
Change the ExecStart line in your service file to:
ExecStart=/home/pi/bin/start_BTC_miners.sh

It has then a better chance to work.
Thanks! BTW - I donno if your name is based on the book, but it's one of my favorites...

So I did what you suggested and I can run the.sh file from command line. I updated the .service file... Still doesnt work. When I run the systemctl status, it's the same! How can I clear the service and start it over??

BTW - if I don't put sudo in front of the command within the .sh file, it will not run properly.

Statistics: Posted by soccerdude71 — Fri Feb 09, 2024 8:10 pm



Viewing all articles
Browse latest Browse all 3831

Trending Articles