Run a command as a daemon which will restart if it crashes, with two attempts every 10 seconds

daemon

daemon --name="{{name}}" --respawn --attempts=2 --delay=10 {{command}}

click the source code to copy install daemon on any operating system with command-not-found.com