#!/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

set ff=unix

set ff=unix 告诉 vim 编辑器,使用unix换行符 使用场景 在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory。 或出现$̵...

阅读全文

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...

阅读全文

欢迎留言