supervisor开机自启动方法
Posted 沧海一粟,何以久远
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了supervisor开机自启动方法相关的知识,希望对你有一定的参考价值。
配置service类型服务
1 #!/bin/bash 2 # 3 # supervisord This scripts turns supervisord on 4 # 5 # Author: Mike McGrath <[email protected]> (based off yumupdatesd) 6 # 7 # chkconfig: - 95 04 8 # 9 # description: supervisor is a process control utility. It has a web based 10 # xmlrpc interface as well as a few other nifty features. 11 # processname: supervisord 12 # config: /etc/supervisor/supervisord.conf 13 # pidfile: /var/run/supervisord.pid 14 # 15 16 # source function library 17 . /etc/rc.d/init.d/functions 18 19 RETVAL=0 20 21 start() { 22 echo -n $"Starting supervisord: " 23 daemon "supervisord -c /etc/supervisor/supervisord.conf " 24 RETVAL=$? 25 echo 26 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/supervisord 27 } 28 29 stop() { 30 echo -n $"Stopping supervisord: " 31 killproc supervisord 32 echo 33 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/supervisord 34 } 35 36 restart() { 37 stop 38 start 39 } 40 41 case "$1" in 42 start) 43 start 44 ;; 45 stop) 46 stop 47 ;; 48 restart|force-reload|reload) 49 restart 50 ;; 51 condrestart) 52 [ -f /var/lock/subsys/supervisord ] && restart 53 ;; 54 status) 55 status supervisord 56 RETVAL=$? 57 ;; 58 *) 59 echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" 60 exit 1 61 esac 62 63 exit $RETVAL
参考:
1、http://blog.csdn.net/xyang81/article/details/51555473
以上是关于supervisor开机自启动方法的主要内容,如果未能解决你的问题,请参考以下文章