Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1069980
  • 博文数量: 186
  • 博客积分: 4939
  • 博客等级: 上校
  • 技术积分: 2075
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-08 17:15
文章分类

全部博文(186)

文章存档

2018年(1)

2017年(3)

2016年(11)

2015年(42)

2014年(21)

2013年(9)

2012年(18)

2011年(46)

2010年(35)

分类: 系统运维

2015-02-13 10:52:02


  1. # See how we were called.
  2. case "$1" in
  3.     start)
  4.         start && exit 0
  5.         ;;
  6.     stop)
  7.         stop || exit 0
  8.         ;;
  9.     status)
  10.         status -p $pidfile $prog
  11.         #### 添加下边一行就可以了 ######
  12.          RETVAL=$?
            #############################
  13.         ;;
  14.     restart)
  15.         stop
  16.         start
  17.         RETVAL=$?
  18.         ;;
  19.     *)
  20.         echo "Usage: $0 {start|stop|status|restart}"
  21.         exit 1
  22. esac

  23. exit $RETVAL
slow_query_conveter的启动脚本部分如上,添加了service,并且ensure => running, 结果不行,手动启动/etc/init.d/xxx 是可以的。

原因在 提到,更详细的是:

  Puppet expects the initscript of the service to have a "status" command that returns 0 if the service is running and a non-zero value otherwise. This is the default behavior of puppet. Try to 

$> sudo service status
$> echo $? //Make sure you are getting the correct return values that puppet expects.



阅读(821) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~