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 >/dev/null
 rm $dir/logs/perl-fcgi.sock >/dev/null
 echo "stop perl-fcgi done"
 }
 
 start ()
 {
 rm $dir/now_start_perl_fcgi.sh >/dev/null
 
 chown nagios.nagios $dir/logs
 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
 
 chown nagios.nagios $dir/now_start_perl_fcgi.sh
 chmod u+x $dir/now_start_perl_fcgi.sh
 
 sudo -u nagios $dir/now_start_perl_fcgi.sh
 echo "start perl-fcgi done"
 }
 
 case $ in
 stop)
 stop
 ;;
 start)
 start
 ;;
 restart)
 stop
 start
 ;;
 esac

nginx环境下配置nagios-关于start_perl_cgi.sh的更多相关文章

  1. nginx环境下配置nagios-关于nagios配置文件nginx.conf

    接上文:nginx环境下配置nagios-关于nginx.conf 配置如下: ;          location ~ .*\.(php|php5)?$          {            ...

  2. nginx环境下配置nagiosQL-关于nagiosql配置文件

    接上文:nginx环境下配置nagios-关于nginx.conf nagiosql文件应该处于conf/domain/目录下 nagiosql配置如下: ;                  gzi ...

  3. Nginx环境下配置PHP使用的SSL认证(https)

    最近一段时间发现好多网站都从http协议变成了加密的https协议,比如说百度.吾志等等.https看起来比http高端了好多,而且在不同的浏览器向上还会显示出不同于http的URL展示效果(比如说c ...

  4. nginx环境下搭建nagios 3.5.0,及配置pnp4nagios画图

    本文基于<LNMP最新源码安装脚本>,Nagios依赖PHP环境和perl环境,由于Nginx不支持Perl的CGI,需先来搭建Perl环境,Nagios原理介绍略.一.下载最新稳定源码包 ...

  5. <nginx+PHP>nginx环境下配置支持php7

    [root@redhat7 ~]# wget http://am1.php.net/get/php-7.1.2.tar.gz/from/this/mirror [root@redhat7 ~]# ta ...

  6. 如何在 Linux 环境下配置 Nagios Remote Plugin Executor (NRPE)

    为 NRPE 配置自定义命令 远程服务器上安装 下面列出了一些可以用于 NRPE 的自定义命令.这些命令在远程服务器的 /etc/nagios/nrpe.cfg 文件中定义. ## 当 1.5.15 ...

  7. nginx环境下配置nagios-关于perl-fcgi.pl

    配置文件如下: 请注意,网上提供的官方文档在运行时可能会出现问题,此文中保证无问题. ; ; ; ;  ); ;  ); ; ;          my $pidnumber = $$;        ...

  8. nginx环境下配置nagios-关于commands.cfg

    -w $ARG1$ -c $ARG2$ -M -b% -c % -f% -c % -f% -c % -f #  define command{         command_name    chec ...

  9. phpmyadmin在nginx环境下配置错误

    location ~ \.css {           add_header  Content-Type    text/css;        } location ~ \.js {        ...

随机推荐

  1. dataWithContentsOfURL报错问题

    NSError *error = nil; NSData* videoData = [NSData dataWithContentsOfURL:[NSURL URLWithString:self.re ...

  2. for循环相关

    循环语句是指令式编程的常见语句,Scala对其加以改进,成为适应函数式风格的利器. for循环中的变量,没有val或者var,是因为变量的类型,完全是集合中的元素的类型.作用域持续到括号结束. 在sc ...

  3. iOS红马甲项目Bug总结(3)

    这里是一些小总结 1.使用图片缓存之后,新添加的图像一直不能显示 2.项目打包通过appliction loader上传成功了,可是itunes 上面的构建版本项,一直没显示出来 3.界面加载之后,t ...

  4. 用多itemtype的具有addHeaderView的recyclerview,还是scrollview?

    如果一个复杂的布局,1,轮播图,2,广告图,3,带标题的list,4,gridview布局,各种不同的布局 在最外层套一个scrollview,里面list 用for循环addView,gridvie ...

  5. Unity3d 引擎原理详细介绍

    体系结构 为了更好地理解游戏的软件架构和对象模型,它获得更好的外观仅有一名Unity3D的游戏引擎和编辑器是非常有用的,它的主要原则. Unity3D 引擎 Unity3D的是一个屡获殊荣的工具,用于 ...

  6. 【转载】C/C++中#ifdef和#endif的用法

    转于 http://www.cnblogs.com/renyuan/archive/2013/05/22/3092362.html 今天笔试的时候遇到这个问题,整理一下! 一般情况下,源程序中所有的行 ...

  7. 类似于C# using() java 语法

    From :   https://www.infoq.com/news/2010/08/arm-blocks try(Jedis jedis = jedisPool.getResource()){ S ...

  8. Linux 服务器的网络配置 - 1. 查看 Linux 服务器的网络连接

    1. 查看 Linux 服务器的网络连接 1)查看主机名: liuqian@ubuntu:~$ hostname ubuntu 2)查看 ip 地址: 用 ifconfig 即可,这里介绍命令组合用法 ...

  9. 如何删除控制文件中过去rman备份到磁带的备份集

    问题描述: 早上做数据库巡检,发现FRA(flash recovery area)空间使用率达到66%,是平时的两倍.由于库不大,备份策略是本地磁盘备份,每天一全备,REDUNDANCY 1 ,备份完 ...

  10. HashTable,HashSet与Dictionary

    1.HashTable 哈希表(HashTable)表示键/值对的集合.在.NET Framework中,Hashtable是System.Collections命名空间提供的一个容器,用于处理和表现 ...