I have the following script that should do the following:
- Stop screen "server" if exists
- Start screen "server"
- Run a java program and detach screen.
However, when I firstly run the script, the program starts. But if I run it again, it does not restart it.
:set fileformat=unix #!/bin/sh screen -S server -X quit; screen -dmS server; cd ~/cadesim-monomer; java -jar CadeServerEngine.jar;
What did I do wrong? CentOS 7