Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1908 from bdecoste/master

update rsync [merge]
  • Loading branch information...
commit 87fe1aca3884e9bc338692537fea2eb51bac019c 2 parents eb831f6 + 150dbc7
@danmcp danmcp authored
View
4 cartridges/openshift-origin-cartridge-abstract/abstract-jboss/info/bin/deploy.sh
@@ -14,7 +14,9 @@ CART_NAME=$(get_cartridge_name_from_path)
if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
then
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
fi
fi
View
7 cartridges/openshift-origin-cartridge-jbossas-7/info/bin/build.sh
@@ -96,9 +96,10 @@ then
if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
then
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
- fi
- fi
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
+ fi
fi
else
export OPENSHIFT_MAVEN_MIRROR
View
6 cartridges/openshift-origin-cartridge-jbosseap-6.0/info/bin/build.sh
@@ -96,8 +96,10 @@ then
if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
then
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
- fi
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
+ fi
fi
fi
else
View
28 cartridges/openshift-origin-cartridge-jbosseap/bin/control
@@ -178,8 +178,10 @@ function deploy() {
CART_NAME=redhat-${cartridge_type}
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/standalone/deployments
- fi
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
+ fi
}
function start() {
@@ -217,15 +219,19 @@ function stop() {
if isrunning
then
- if [ -f "$JBOSSEAP_PID_FILE" ]; then
- source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_stop_${cartridge_type}
- pid=$(cat $JBOSSEAP_PID_FILE);
- echo "Sending SIGTERM to jboss:$pid ..." 1>&2
- killtree $pid
- source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/post_stop_${cartridge_type}
- else
- echo "Failed to locate JBOSS PID File" 1>&2
- fi
+ if hot_deploy_marker_is_present ; then
+ echo "Hot deploy enabled. Not stopping"
+ else
+ if [ -f "$JBOSSEAP_PID_FILE" ]; then
+ source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_stop_${cartridge_type}
+ pid=$(cat $JBOSSEAP_PID_FILE);
+ echo "Sending SIGTERM to jboss:$pid ..." 1>&2
+ killtree $pid
+ source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/post_stop_${cartridge_type}
+ else
+ echo "Failed to locate JBOSS PID File" 1>&2
+ fi
+ fi
fi
}
Please sign in to comment.
Something went wrong with that request. Please try again.