Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 35 lines (25 sloc) 782 Bytes
#!/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
# debug
# set -x
echo "in start"
#loads VERSION, DEPS_PARAMS, ID, LOG_FILE, PLAY_COMMAND="${OPENSHIFT_DATA_DIR}play-${VERSION}/play"
. ${OPENSHIFT_REPO_DIR}.openshift/action_hooks/load_config
if [[ ! $? -eq 0 ]]; then
exit $?
fi
## stop play application
${OPENSHIFT_REPO_DIR}.openshift/action_hooks/stop
if [[ ! $? -eq 0 ]]; then
echo "Error: could not stop play application"
exit 1
fi
nohup bash -c "${OPENSHIFT_REPO_DIR}target/start $PLAY_PARAMS &>> ${LOG_FILE} 2>&1" &> /dev/null &
if [[ ! $? -eq 0 ]]; then
echo "Error: starting play application"
echo "Error executing '$APP_COMMAND'"
exit 1
fi
exit 0