mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-30 10:58:14 +08:00
25 lines
556 B
Bash
25 lines
556 B
Bash
#!/bin/bash
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
|
export PATH
|
|
LANG=en_US.UTF-8
|
|
|
|
# 解压命令
|
|
if [[ ! -f "/usr/bin/unzip" ]];then
|
|
#rm -f /etc/yum.repos.d/epel.repo
|
|
yum install unzip -y
|
|
fi
|
|
TYPE="$1"
|
|
# 判断
|
|
if [[ -z "${TYPE}" ]] ; then
|
|
TYPE="Server";
|
|
fi
|
|
# 下载
|
|
wget -O ${TYPE}.zip https://1232788122276831.cn-beijing.fc.aliyuncs.com/2016-08-15/proxy/jpom/jpom-releases/?type=${TYPE}
|
|
# 解压
|
|
unzip -o ${TYPE}.zip
|
|
# 删除安装包
|
|
rm -f ${TYPE}.zip
|
|
# 添加权限
|
|
chmod 755 ${TYPE}.sh
|
|
# 启动
|
|
sh ${TYPE}.sh start |