zl1991
#!/bin/bash
#判断进程是否存在,如果不存在就启动它
PIDS=`ps aux |grep myprocess |grep -v grep | awk \'{print $2}\'`
if [ "$PIDS" != "" ]; then
echo "myprocess is runing!"
else
cd /root/
./myprocess
#运行进程

 

分类:

技术点:

相关文章: