码迷,mamicode.com
首页 > 移动开发 > 详细

nginx环境下配置nagios-关于start_perl_cgi.sh

时间:2014-07-07 10:00:30      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   os   art   io   

 1 #!/bin/bash
 2 set -x
 3 dir=/export/servers/nginx
 4 
 5 stop ()
 6 {
 7 #pkill  -f  $dir/perl-fcgi.pl
 8 kill $(cat $dir/logs/perl-fcgi.pid)
 9 rm $dir/logs/perl-fcgi.pid 2>/dev/null
10 rm $dir/logs/perl-fcgi.sock 2>/dev/null
11 echo "stop perl-fcgi done"
12 }
13 
14 start ()
15 {
16 rm $dir/now_start_perl_fcgi.sh 2>/dev/null
17 
18 chown nagios.nagios $dir/logs
19 echo "$dir/perl-fcgi.pl -l $dir/logs/perl-fcgi.log -pid $dir/logs/perl-fcgi.pid -S $dir/logs/perl-fcgi.sock" >>$dir/now_start_perl_fcgi.sh
20 
21 chown nagios.nagios $dir/now_start_perl_fcgi.sh
22 chmod u+x $dir/now_start_perl_fcgi.sh
23 
24 sudo -u nagios $dir/now_start_perl_fcgi.sh
25 echo "start perl-fcgi done"
26 }
27 
28 case $1 in
29 stop)
30 stop
31 ;;
32 start)
33 start
34 ;;
35 restart)
36 stop
37 start
38 ;;
39 esac

nginx环境下配置nagios-关于start_perl_cgi.sh,布布扣,bubuko.com

nginx环境下配置nagios-关于start_perl_cgi.sh

标签:style   blog   color   os   art   io   

原文地址:http://www.cnblogs.com/zhuhongbao/p/3820486.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!