Here’s a Bash script that can stop and start a Java service.
#/bin/bash PID=$(cat app.pid) kill $PID java -jar app.jar & echo $! > app.pid
The file app.jar is an executable jar file.
Here’s a Bash script that can stop and start a Java service.
#/bin/bash PID=$(cat app.pid) kill $PID java -jar app.jar & echo $! > app.pid
The file app.jar is an executable jar file.