I'm trying to write an auto start script that starts on boot and restarts if it crashes. The start on boot is doable by simply adding the script to the
File, however my problem is the auto restart. I thought about exporting the $$ Variable into an external text file before starting the actual script, and using this with another script to check whether that pid still is running or not. My question is now how to check if a specific PID is still running and also if there is a more reliable way to do this.