start.sh 306 B

12345678910
  1. #!/bin/bash
  2. app=${name}-${version}.jar
  3. pid=`ps -ef|grep \$app|grep -v "grep"|awk '{print \$2}'`
  4. if [ -z \$pid ]
  5. then
  6. nohup java -cp \$app -Dloader.path=lib -Dfile.encoding="UTF-8" org.springframework.boot.loader.PropertiesLauncher &
  7. echo 'Start service ok!'
  8. else
  9. echo 'Error: service is started!'
  10. fi