linux下shell脚本启动java程序jar包
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
SERVER=/home/lytz/zhengzy/myapp_email
cd $SERVER
start(){
echo "start project..."
JAVA_HOME=/usr/java/jdk1.7.0_79
export JAVA_HOME
PATH=$JAVA_HOME/bin:.:$PATH
export PATH
cd /home/lytz/zhengzy/myapp_email
#cd ../app/3-trade_service
classPath="./myapp_email.jar:./lib/mail.jar:./lib/ojdbc5.jar"
nohup java -Dfile.encoding=utf-8 -cp $classPath -Djava.security.policy=email_server-security.policy com.lytz.ServerStart &
echo $! > $SERVER/server.pid
echo "start project end..."
}
stop(){
echo "stop project..."
kill `cat $SERVER/server.pid`
rm -rf $SERVER/server.pid
echo "stop project end..."
}
restart(){
stop
sleep 1
start
}
echo "User Command: {start:1|stop:2|restart:3}"
read aNum
case $aNum in
1)
start
;;
2)
stop
;;
3)
restart
;;
*) echo 'You do not select a number between 1 to 3'
;;
esac
exit 1
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献2条内容
所有评论(0)