给出mac 下shell版本
#!/bin/sh
#=====================
#
# ps -ef|grep Thunder.app
#=====================
while :
do
stillRunning=$(ps -ef |grep "Thunder.app" |grep -v "grep")
if [ "$stillRunning" ] ; then
echo "Thunder.app service was already started"
else
echo "Thunder.app service was not started"
echo "Starting Thunder.app service ..."
`open /Applications/Thunder.app`
fi
sleep 6
done
请用nodejs实现,代码放到github上,回贴中留下地址,我会去review
你是否有更好更快的方法?哈哈.