Skip to content

Instantly share code, notes, and snippets.

@m-wrona
Created June 7, 2016 06:34
Show Gist options
  • Save m-wrona/4d8664e7e53a2f8e1248e4e4cf22aea9 to your computer and use it in GitHub Desktop.
Save m-wrona/4d8664e7e53a2f8e1248e4e4cf22aea9 to your computer and use it in GitHub Desktop.
DevOps - start/stop JAR scripts
#!/bin/sh
java -jar {{ upload_dir }}/{{ full_jar_name }} {{ pkg_params }} --spring.config.location={{ upload_dir }}/{{ pkg_name }}.properties --logging.config={{ upload_dir }}/logback.xml &
PID=$!
echo $PID > {{ run_dir }}/{{ pkg_name }}.pid
exit 0
#!/bin/sh
PID=`cat {{ run_dir }}/{{ pkg_name }}.pid 2>/dev/null`
kill -9 $PID 2>/dev/null
rm {{ run_dir }}/{{ pkg_name }}.pid 2>/dev/null
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment