I'm running a Java server program that needs to be started with a shell script. The script needs to start the Java program again if it happens to crash or be stopped manually.
I found this script online for it
while true do java -jar program.jar done
But that didn't seem to work on my Debian 7 box; it just shows:
./start.sh: line 4: syntax error: unexpected end of file
That was just posted as a "Linux" script. How can I make it work in Debian? Oh yeah and it's important for the program to be started from the script because I need to access its console regularly, unless there's a way for it to not be a script but still let me access its console.