Skip to content

Instantly share code, notes, and snippets.

@kasramp
Created July 8, 2016 06:57
Show Gist options
  • Save kasramp/dd04dba9597a978044211d7208f13a2e to your computer and use it in GitHub Desktop.
Save kasramp/dd04dba9597a978044211d7208f13a2e to your computer and use it in GitHub Desktop.
OpenShift stop script
#!/bin/bash
source $OPENSHIFT_CARTRIDGE_SDK_BASH
PID=$(ps -ef | grep java.*\.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
client_result "Application is already stopped"
else
kill $PID
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment