Commit c794e0b4 by BoxuanXu

add daemon's code

1 parent 54e6de8b
Showing with 23 additions and 0 deletions
#########################################################################
# name: keep.sh
# Author: seetatech xuboxuan
# mail: boxuan.xu@seetatech.com
# Created Time: 16 Aug 2017 07:49:46 PM CST
#########################################################################
#!/bin/bash
sn=`ps x | grep Drive_Converter.py | grep -v grep | awk '{print $1}'`
echo $sn
if [ "${sn}" = "" ] #如果为空,表示进程未启动
then
echo no sdk_process
mv log log_bak/`date +%s`.log.bak
nohup python Drive_Converter.py > log 2>&1 &
echo start success
fi
#!/bin/sh
kill -9 `ps x | grep Drive | grep -v grep | awk '{print $1}'`
sleep 1
mv log log_bak/`date +%s`.log.bak
nohup python Drive_Converter.py > log 2>&1 &
echo start success
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!