验证一个进程是否起来,没有重启的shell脚本

#!/bin/sh

#button
ps -fe|grep "button" |grep -v grep
if [ $? -ne 0 ]
then
echo "Create button process..."
	button &
else
	echo "button process has already running."
fi
原创文章 103 获赞 158 访问量 8万+

猜你喜欢

转载自blog.csdn.net/csdnxmj/article/details/103024012