I have a script which streams important logs from another system.
Unfortunately the machines are separated by a large distance which means that the connection between them can be poor.
How to deal with a script which streams data, but has a tendency to stop? Is there an easy way to turn a script into a daemon so that upon an exit, the kernel restarts the process?