Start a java application and write its PID to file using nohup
#!/usr/bin/env bash
nohup java -jar target/my-awesome-app-0.0.1-SNAPSHOT.jar > /dev/null 2>&1 & echo $! > /usr/local/var/run/my-awesome-app.pidWritten by Deepu Mohan Puthrote
Related protips
1 Response
ππ
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Pid
Authors
warfox
4.23K
paulspringett
3.631K
Sponsored by #native_company# β Learn More
#native_title#
#native_desc#