docker/finebi/run.sh
2021-03-26 16:37:39 +08:00

28 lines
803 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 不修改webroot的名字不然DEMO页面都会有影响除非不看全部demo
FINEBI_NAME="webroot"
WEB_HOME="${CATALINA_HOME}/webapps"
FINEBI_DIR="${WEB_HOME}/${FINEBI_NAME}"
EXTRA_JAR_DIR="/libs"
if [[ -f ${WEB_HOME}/reinstall ]]; then
rm -rf ${FINEBI_DIR} &&
rm -f ${WEB_HOME}/reinstall
fi
if [[ ! -d $FINEBI_DIR ]]; then
echo "finebi app not installed."
echo "extract to webapps"
# 压缩包是从windows获得并且打包的所以有乱码问题。解压时指定编码。
cd /tmp && unzip -O GB18030 webroot.zip &&
mv /tmp/webroot ${FINEBI_DIR}
cp ${JAVA_HOME}/lib/tools.jar ${FINEBI_DIR}/WEB-INF/lib
# 拷贝附加jar包如驱动到应用
cp ${EXTRA_JAR_DIR}/*.jar ${FINEBI_DIR}/WEB-INF/lib
fi
exec ${CATALINA_HOME}/bin/catalina.sh run