April 11, 2022
#!bin/bash
until <python python_scipt.py>; do
echo "script died with error #?. Restarting it" >&2
sleep 1
done
nohup <path to your shell script> &
ps -aux | grep <script name>
This should return the PID associated with the script running in the system.
kill -9 <PID of the job to kill>