Search results

  1. L

    Restart Python3 scripts if they exit/fail

    Well, thank you very much, it's running for the first time using a service! I appreciate your patience on this. A couple things I still would love to be able to do. First, be able to watch the log live, the commands I tried above showed me some historic things, but I can see the scripts are...
  2. L

    Restart Python3 scripts if they exit/fail

    Ok - I did that. I don't see errors, but I need to wait a bit to see if this is working. I'm using journalctl -xef -u phonetrack and waiting to see if I can see the process checking the phone every once and a while...but I am not seeing anything (I should see it try to determine presence in the...
  3. L

    Restart Python3 scripts if they exit/fail

    I think the failure for edgebridge happened because an occurrence was running through screen (I stopped that process) and no more error. When I type "groups" while logged in under 'pi' it just lists 'pi' as the first one. pi@raspberrypi:~ $ groups pi adm dialout cdrom sudo audio video...
  4. L

    Restart Python3 scripts if they exit/fail

    Not sure if this is correct, but after I did this command, enable now works: chown -R pi.user /home/pi/.config/systemd However, I am getting an exit code one for the edgebridge server: pi@raspberrypi:~/.config/systemd/user $ systemctl --user status edgebridge ● edgebridge.service - edgebridge...
  5. L

    Restart Python3 scripts if they exit/fail

    Yes, this is exactly what was happening :)
  6. L

    Restart Python3 scripts if they exit/fail

    No problem at all, you're helping me, so I'm glad this shed some light. As usual, user error :) I tried the command "chown -R pi.user /home/pi/.config/systemd" and this is what I got: oot@raspberrypi:/# chown -R pi.user /home/pi/.config/systemd chown: invalid user: ‘pi.user’
  7. L

    Restart Python3 scripts if they exit/fail

    The bash script example you provided kept loading one of the python scripts over and over again.
  8. L

    Restart Python3 scripts if they exit/fail

    A little context to what these scripts do: They detect WiFi on phones to determine presence for automation. The edgebridge is a server that passes on information to a home automation system and phonetrack is what passes on the information to edgebridge. Phonetrack works in tandem with a .cfg...
  9. L

    Restart Python3 scripts if they exit/fail

    Yes, when I do the status, that's where it shows the service is disabled (for both scripts.) For the bash script, I have 2 scripts. Should I make a bash script for each one or somehow include it in one? Any way to have that bash script use sendmail to send the message? Also, what type of...
  10. L

    Restart Python3 scripts if they exit/fail

    Ok, interesting. I am logging in under "pi" via SSH. This is what I have struggled with for weeks to try to figure out: How the Python3 scripts work without any issues running the command directly (Python3 nameofscrip.py) or via the Screen method. What am I missing?:) Is there any log or...
  11. L

    Restart Python3 scripts if they exit/fail

    Hi, when I try to enable each of the 2 python3 scripts, I am getting the below message - note: I added (name) below just so you can see what it's saying (it would be one of the names of the 2 different services I named/created with nano): Failed to enable unit: Unit file...
  12. L

    Restart Python3 scripts if they exit/fail

    Very much appreciated. A big difference is I didn't create that directory that you created. One thing that I noticed is that one of the scripts was not finding a configuration file it needs, even though it is in the home/pi directory. I was putting the .service files under...
  13. L

    Restart Python3 scripts if they exit/fail

    Appreciate it - I'll check it out. I'm probably going to need a bit more guidance with building the .service file, as I think that's the issue and what I am not doing right.
  14. L

    Restart Python3 scripts if they exit/fail

    Hi, I am trying to get 2 Python3 scripts to restart if there's an error or other occurrence. I have a Raspberry Pi running on Debian 24/7 - Buster. Right now, I have the 2 Python scripts running in the "Screen" program because I didn't want to leave SSH terminals open (I use my Raspberry Pi...
Top