Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service filestart the application with a systemd (since that is what I have on all my machines) .service file.

In that service file, I would point to a script that wraps your application in a simple while loop. Something like this:

#!/bin/sh while true; do /path/to/your/application done 

This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.

This is one approach, and the simplest I can think of, there may be others!

Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service file.

In that service file, I would point to a script that wraps your application in a simple while loop. Something like this:

#!/bin/sh while true; do /path/to/your/application done 

This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.

This is one approach, and the simplest I can think of, there may be others!

Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service file.

In that service file, I would point to a script that wraps your application in a simple while loop. Something like this:

#!/bin/sh while true; do /path/to/your/application done 

This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.

This is one approach, and the simplest I can think of, there may be others!

added 3 characters in body
Source Link
anon
anon

Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service file.

In that service file, I would startpoint to a script that wraps your application in a simple while loop. Something like this:

#!/bin/sh while true; do /path/to/your/application done 

This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.

This is one approach, and the simplest I can think of, there may be others!

Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service file.

In that service file, I would start a script that wraps your application in a simple while loop. Something like this:

#!/bin/sh while true; do /path/to/your/application done 

This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.

This is one approach, and the simplest I can think of, there may be others!

Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service file.

In that service file, I would point to a script that wraps your application in a simple while loop. Something like this:

#!/bin/sh while true; do /path/to/your/application done 

This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.

This is one approach, and the simplest I can think of, there may be others!

Source Link
anon
anon

Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service file.

In that service file, I would start a script that wraps your application in a simple while loop. Something like this:

#!/bin/sh while true; do /path/to/your/application done 

This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.

This is one approach, and the simplest I can think of, there may be others!