Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 6556a7b059
Fetching contributors…

Cannot retrieve contributors at this time

executable file 50 lines (35 sloc) 1.025 kB
#!/bin/bash
# Start the application httpd instance
function print_help {
echo "Usage: $0 app-name namespace uuid"
echo "Start a running application"
echo "$0 $@" | logger -p local0.notice -t openshift_origin_export_port
exit 1
}
while getopts 'd' OPTION
do
case $OPTION in
d) set -x
;;
?) print_help
;;
esac
done
[ $# -eq 3 ] || print_help
source "/etc/openshift/node.conf"
source ${CARTRIDGE_BASE_PATH}/abstract/info/lib/util
CART_NS=$(get_cartridge_namespace_from_path)
setup_configure "$1" $2 $3
import_env_vars
proxy_port=$(find_next_proxy_port $uuid "$OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT")
ret=$?
if [ $ret -ne 0 ]; then
client_error "$proxy_port"
exit $ret
fi
echo "export OPENSHIFT_${CART_NS}_PROXY_PORT=$proxy_port" > $APP_HOME/.env/OPENSHIFT_${CART_NS}_PROXY_PORT
cart_data "PROXY_HOST=$OPENSHIFT_GEAR_DNS"
cart_data "PROXY_PORT=$proxy_port"
cart_data "HOST=$OPENSHIFT_INTERNAL_IP"
cart_data "PORT=$OPENSHIFT_INTERNAL_PORT"
exit 0
Jump to Line
Something went wrong with that request. Please try again.