1 Star 0 Fork 604

bobo/kooteam

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
start.sh 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
十目 提交于 2020-03-16 09:28 . 0.9.2稳定版发布
#!/bin/bash
SERVICE=kooteam
MEMORY=256m
Download() {
APP_FILE=./${SERVICE}.tar.gz
if [ -e ${APP_FILE} ];then rm -rf ${APP_FILE};fi
version=`cat ./config/version`
result=$(curl -G 'https://www.kooteam.com/home/download.do?app=kooteam&type=upgrade&version='${version})
if [ $result = 'newly' ];then
echo 'Kooteam version is up to date'
exit 5
else
curl -L -o ${APP_FILE} ${result}
tar -xvf ${APP_FILE}
fi
}
Start() {
proc=$(ps -ef | grep ${SERVICE}.jar | grep -v grep | wc -l)
if [ $proc != 0 ];then
sleep 3
echo 'Kooteam Is Runing'
exit 5
else
exec java -server -Xms${MEMORY} -Xmx${MEMORY} -jar ./${SERVICE}.jar >> ./${SERVICE}.log 2>&1 &
echo 'Starting Success'
fi
}
Stop() {
ps aux | grep ${SERVICE}.jar | grep -v grep | awk '{print $2}'| xargs kill -9
sleep 3
proc=$(ps -ef | grep ${SERVICE}.jar | grep -v grep | wc -l)
if [ $proc != 0 ];then
ps -ef | grep ${SERVICE}.jar | grep -v grep | awk '{print $2}'| xargs kill -9
fi
echo 'Kooteam Stoped'
}
Install() {
Stop
Download
Start
}
Restart() {
Stop
Start
}
case $1 in
start|run)
Start
;;
stop)
Stop
;;
download)
Download
;;
upgrade)
Install
;;
restart)
Restart
;;
*)
Start
;;
esac
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/baitongda/kooteam.git
git@gitee.com:baitongda/kooteam.git
baitongda
kooteam
kooteam
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385