知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

监控服务是否存在,如果不存在就创建

发布时间:2014-09-05 15:20:21作者:知识屋


监控服务是否存在,如果不存在就创建
 
#!/bin/sh  www.zhishiwu.com  
kill_result=`ps aux | grep 'index.php' | grep -v grep | wc -l`
if [ $kill_result -eq 0 ] ; then
  nohup /usr/local/php/bin/php  /var/www/q5.youxigu.com/pay/index.php &
fi
 
kill_result=`ps aux | grep 'autosn_processing.php' | grep -v grep | wc -l`
if [ $kill_result -eq 0 ] ; then
  nohup /usr/local/php/bin/php  /var/www/q5.youxigu.com/getsn/autosn_processing.php &
fi
 
 
(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜