Created
June 6, 2012 11:30
-
-
Save ordnungswidrig/2881373 to your computer and use it in GitHub Desktop.
Openshift start and stop hook for leiningen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The logic to start up your application should be put in this | |
# script. The application will work only if it binds to | |
# $OPENSHIFT_INTERNAL_IP:8080 | |
# save as .openshift/action_hooks/start | |
export HTTP_CLIENT="wget --no-check-certificate -O" | |
export PORT=$OPENSHIFT_INTERNAL_PORT | |
export HOST=$OPENSHIFT_INTERNAL_IP | |
export HOME=$OPENSHIFT_DATA_DIR/home | |
export LEIN_JVM_OPTS=-Duser.home=$HOME | |
cd $OPENSHIFT_REPO_DIR | |
$OPENSHIFT_REPO_DIR/bin/lein run >${OPENSHIFT_LOG_DIR}/lein.log 2>&1 & | |
disown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The logic to stop your application should be put in this script. | |
# save as .openshift/action_hooks/stop | |
kill `ps -ef | grep lein | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment