瀏覽代碼

update docs

tags/v1.4.28
Jonathan Cobb 3 年之前
父節點
當前提交
e8bf7700d9
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. +8
    -4
      bin/bpatchfull

+ 8
- 4
bin/bpatchfull 查看文件

@@ -21,9 +21,13 @@ SCRIPT="${0}"
SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
. ${SCRIPT_DIR}/bubble_common

HOST=${1:?no host provided}
HOST="${1:?no host provided}"
NO_RESTART=${2}

if [[ -z "$(echo "${HOST}" | tr -cd '[:alnum:].-')" ]] ; then
die "invalid host: ${HOST}"
fi

if [[ -z "${BUBBLE_SSH_PORT}" ]] ; then
BUBBLE_SSH_PORT="1202"
fi
@@ -55,14 +59,14 @@ else
fi

if [[ ! -z "${NO_RESTART}" && "${NO_RESTART}" == "norestart" ]] ; then
echo "Patching but not restarting..."
echo "Patching but not restarting: ${HOST} ..."
ssh -p ${BUBBLE_SSH_PORT} ${HOST} "cat /tmp/bubble.jar > ~bubble/api/bubble.jar"
else
echo "Patching and restarting..."
echo "Patching and restarting: ${HOST} ..."
ssh -p ${BUBBLE_SSH_PORT} ${HOST} "cat /tmp/bubble.jar > ~bubble/api/bubble.jar && supervisorctl restart bubble"
fi

if unzip -Z -1 ./target/bubble*.jar | grep -q "^site/$" ; then
echo "Deploying new web..."
echo "Deploying new web: ${HOST} ..."
ssh -p ${BUBBLE_SSH_PORT} ${HOST} "cd ~bubble && unzip -o /tmp/bubble.jar 'site/*' && chown -R bubble:bubble site"
fi

Loading…
取消
儲存