jenkins_job
#!/bin/bash
set -ex #打印执行过程
BUILD_ID=DONTKILLME #防止自杀
ssh dataexa@192.168.1.65 > /dev/null 2>&1 << eeooff
cd /home/dataexa/dataexa/nlp/
git clone http://git.gaofeng.com:83/kamala/kamala-product/kamala-aimarket/nlp.git
ps -ef | grep 5001 | grep -v grep | awk '{print $2}' | xargs kill -9 ##这里必须用xargs 否则会出现别的问题
source activate py36
nohup python -u PythonRPCImpl.py 192.168.1.65 5001 > nlp_server_$(date +%Y%m%d)_5001.log 2>&1 &
exit
eeooff
echo done!