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 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐