Commit c0737563 by BoxuanXu

fix ps argument's bug

1 parent f03bdc49
Showing with 2 additions and 2 deletions
......@@ -6,7 +6,7 @@
#########################################################################
#!/bin/bash
sn=`ps x | grep Drive_Converter.py | grep -v grep | awk '{print $1}'`
sn=`ps -ef | grep Drive_Converter.py | grep -v grep | awk '{print $2}'`
echo $sn
if [ "${sn}" = "" ] #如果为空,表示进程未启动
then
......
#!/bin/sh
kill -9 `ps x | grep Drive | grep -v grep | awk '{print $1}'`
kill -9 `ps -ef | grep Drive | grep -v grep | awk '{print $2}'`
sleep 1
mv log log_bak/`date +%s`.log.bak
nohup python Drive_Converter.py > log 2>&1 &
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!