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

Troubleshooting • Python and Systemd. Program keeps restarting imediately.

$
0
0
I am attempting to use systemd. Here is the contents of my file:

Code:

[Unit]Description=Auto ferment monitor programAfter=network.targetStartLimitIntervalSec=0[Service]Type=simpleRestart=alwaysRestartSec=1User=brewmasterExecStart=/home/brewmaster/projects/autoferment/venv/bin/python3 /home/brewmaster/projects/autoferment/main.py[Install]WantedBy=multi-user.target
When I run the service ferment.service, it will ask for my password. I enter the password and I hear my 5v relay clicking on, then off. It just keeps doing this and does not stop. The program itself runs fine when I run it in terminal. I have looked at the sticky guide on Running a program at start up for systemd and that did not shed light on what I'm getting wrong. Where can I start to find out what is going on?
The program is a temp reader, that switches a relay on or off depending on the temperature, then displays on an LCD. I have created a virtual environment for the program.

Statistics: Posted by BlueBarryCat — Thu Aug 29, 2024 11:58 pm



Viewing all articles
Browse latest Browse all 3873

Trending Articles