1

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?

2

Are you on a systemd OS? Writing a unit file is pretty straightforward.

http://patrakov.blogspot.com/2011/01/writing-systemd-service-files.html

  • Yes, Ubuntu 16.04LTS which uses systemd. Thank you – Greg Sep 28 '17 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.