#!/bin/bash
#written by wupan@2016-12-29
appPath='/root/app/boss/xyd-housefund-upload'
svnPath='/root/app/boss'
# kill
pid=`ps aux | grep xyd-housefund-upload-1.0.jar | grep -v grep | awk '{print $2}'`
echo $pid
if [ "$pid"x != ""x ]; then
    kill -s 9 $pid
fi

# 更新
cd $svnPath
svn up
cd $appPath
mvn clean package
# 启动
nohup java -jar $appPath/target/xyd-housefund-upload-1.0.jar > /root/app/sh/log/upload.log 2>&1 &
pid=`ps aux | grep xyd-housefund-upload-1.0.jar | grep -v grep | awk '{print $2}'`
echo `date +%F-%T` "- upload service is startup success... pid =" $pid

commandlinefu.cn

watch -n 1 'date "+obase=2; print %H,\":\",%M,\":\",%S" |bc' 二进制时钟

阅读全文

linux下杀死进程(kill)的N种方法

http://blog.csdn.net/andy572633/article/details/7211546 转载一篇,最原始的出处已不可考,望见谅! 常规篇:  首先,用ps查看进程,方法如下: $ ps -ef...

阅读全文

linux时间同步

ntpdate -u ntp.api.bz

阅读全文

欢迎留言