From 4760be886293f963490dbb222bbd040f301094c9 Mon Sep 17 00:00:00 2001 From: dailidong Date: Thu, 18 Apr 2019 15:09:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E9=83=A8=E7=BD=B2=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- escheduler-ui/install(线上环境).sh | 47 +++++++++++++++++++++----- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/escheduler-ui/install(线上环境).sh b/escheduler-ui/install(线上环境).sh index de38735f82..c6266b98b2 100755 --- a/escheduler-ui/install(线上环境).sh +++ b/escheduler-ui/install(线上环境).sh @@ -1,21 +1,52 @@ - #!/bin/bash -echo "escheduler-ui-install.sh" -echo "escheduler-ui目录下执行" + +# 当前路径 +esc_basepath=$(cd `dirname $0`; pwd) + + +echo "欢迎使用easy scheduler前端部署脚本,目前前端部署脚本仅支持Centos" +echo "请在 escheduler-ui 目录下执行" # 配置前端访问端口 esc_proxy="8888" # 配置代理后端接口 -esc_proxy_port="http://192.168.220.154:12345" - -# 当前路径 -esc_basepath=$(cd `dirname $0`; pwd) +esc_proxy_port="http://192.168.xx.xx:12345" # 本机ip -esc_ipaddr='172.0.0.1' +esc_ipaddr='127.0.0.1' + esc_ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}') + +#To be compatible with MacOS and Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # Mac OSX + echo "Easy Scheduler ui install not support Mac OSX operating system" + exit 1 +elif [[ "$OSTYPE" == "linux-gnu" ]]; then + # linux + echo "linux" +elif [[ "$OSTYPE" == "cygwin" ]]; then + # POSIX compatibility layer and Linux environment emulation for Windows + echo "Easy Scheduler ui not support Windows operating system" + exit 1 +elif [[ "$OSTYPE" == "msys" ]]; then + # Lightweight shell and GNU utilities compiled for Windows (part of MinGW) + echo "Easy Scheduler ui not support Windows operating system" + exit 1 +elif [[ "$OSTYPE" == "win32" ]]; then + echo "Easy Scheduler ui not support Windows operating system" + exit 1 +elif [[ "$OSTYPE" == "freebsd"* ]]; then + # ... + echo "freebsd" +else + # Unknown. + echo "Operating system unknown, please tell us(submit issue) for better service" + exit 1 +fi + # 区分版本 version=`cat /etc/redhat-release|sed -r 's/.* ([0-9]+)\..*/\1/'`