Skip to content
This repository
Browse code

Merge pull request #1908 from bdecoste/master

update rsync [merge]
  • Loading branch information...
commit 87fe1aca3884e9bc338692537fea2eb51bac019c 2 parents eb831f6 + 150dbc7
Dan McPherson danmcp authored
4 cartridges/openshift-origin-cartridge-abstract/abstract-jboss/info/bin/deploy.sh
@@ -14,7 +14,9 @@ CART_NAME=$(get_cartridge_name_from_path)
14 14 if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
15 15 then
16 16 if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
17   - rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
  17 + rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
  18 + else
  19 + rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
18 20 fi
19 21 fi
20 22
7 cartridges/openshift-origin-cartridge-jbossas-7/info/bin/build.sh
@@ -96,9 +96,10 @@ then
96 96 if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
97 97 then
98 98 if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
99   - rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
100   - fi
101   - fi
  99 + rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
  100 + else
  101 + rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
  102 + fi
102 103 fi
103 104 else
104 105 export OPENSHIFT_MAVEN_MIRROR
6 cartridges/openshift-origin-cartridge-jbosseap-6.0/info/bin/build.sh
@@ -96,8 +96,10 @@ then
96 96 if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
97 97 then
98 98 if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
99   - rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
100   - fi
  99 + rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
  100 + else
  101 + rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
  102 + fi
101 103 fi
102 104 fi
103 105 else
28 cartridges/openshift-origin-cartridge-jbosseap/bin/control
@@ -178,8 +178,10 @@ function deploy() {
178 178 CART_NAME=redhat-${cartridge_type}
179 179
180 180 if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
181   - rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/standalone/deployments
182   - fi
  181 + rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/standalone/deployments/
  182 + else
  183 + rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
  184 + fi
183 185 }
184 186
185 187 function start() {
@@ -217,15 +219,19 @@ function stop() {
217 219
218 220 if isrunning
219 221 then
220   - if [ -f "$JBOSSEAP_PID_FILE" ]; then
221   - source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_stop_${cartridge_type}
222   - pid=$(cat $JBOSSEAP_PID_FILE);
223   - echo "Sending SIGTERM to jboss:$pid ..." 1>&2
224   - killtree $pid
225   - source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/post_stop_${cartridge_type}
226   - else
227   - echo "Failed to locate JBOSS PID File" 1>&2
228   - fi
  222 + if hot_deploy_marker_is_present ; then
  223 + echo "Hot deploy enabled. Not stopping"
  224 + else
  225 + if [ -f "$JBOSSEAP_PID_FILE" ]; then
  226 + source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_stop_${cartridge_type}
  227 + pid=$(cat $JBOSSEAP_PID_FILE);
  228 + echo "Sending SIGTERM to jboss:$pid ..." 1>&2
  229 + killtree $pid
  230 + source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/post_stop_${cartridge_type}
  231 + else
  232 + echo "Failed to locate JBOSS PID File" 1>&2
  233 + fi
  234 + fi
229 235 fi
230 236 }
231 237

0 comments on commit 87fe1ac

Please sign in to comment.
Something went wrong with that request. Please try again.