Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: dspence on May 08, 2020, 11:45:34 AM
-
Hi all,
I'm using Tiny Core 8. I have a program that needs to automatically be restarted if it crashes or quits. What is the best way to achieve that? Is there an extension that will do this for me, or something already installed in the core?
Thanks!
-
As long as your program is not a daemon that automatically puts itself in the background, here is a simple solution:
#!/bin/sh
while true; do
your-program
done
The script starts your-program and waits; anytime your-program stops running for any reason, the script starts your-program and waits :)
-
Wow! GNUser, that is perfect! And so simple! Thank you very much!! :)