I recently got a host where java apps are launched this way:/bin/bash ./restarter.sh java <lot of java params>It ensures that if the app dies, then restarter.sh runs it again.There is content of restarter.sh:#!/bin/bashuntil $@; do  echo Server crashed with exit code $?.  Respawning.. >&2  sleep 1donePlease help me to understand how it works. 
How exactly does 'until $@' work in bash scripts?
bash;shell script
It means to loop until the command($@) completes execution with a exit code of 0.Example:$ until (echo Myprog ; sleep 1; exit 1;); do echo Error respawning ...; doneMyprogError respawning ...MyprogError respawning ...Myprog^C$ until (echo Myprog ; sleep 1; exit 0;); do echo Error respawning ...; doneMyprogAnalyzing your script:Normally, a well written application would exit with exit code of zero on successful completion and non-zero exit code otherwise. In your case, you are using the until command to keep restarting the application:java <lot of java params> until the application completes its execution successfully(exit code of zero).