码迷,mamicode.com
首页 > 其他好文 > 详细

安装supervisor

时间:2020-07-31 12:28:12      阅读:70      评论:0      收藏:0      [点我收藏+]

标签:chmod   mmc   sage   ret   starting   web   roc   mon   reload   

pip install supervisor
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org  --upgrade supervisor
echo_supervisord_conf > /etc/supervisord.conf
ln -s /usr/local/bin/supervisord /usr/bin/supervisord

cat /etc/init.d/supervisord EOF<<
#!/bin/bash
#
# supervisord   This scripts turns supervisord on
#
# Author:       Mike McGrath <mmcgrath@redhat.com> (based off yumupdatesd)
#
# chkconfig:    - 95 04
#
# description:  supervisor is a process control utility.  It has a web based
#               xmlrpc interface as well as a few other nifty features.
# processname:  supervisord
# config: /etc/supervisord.conf
# pidfile: /var/run/supervisord.pid
#

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0

start() {
        echo -n $"Starting supervisord: "
        daemon supervisord
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/supervisord
}

stop() {
        echo -n $"Stopping supervisord: "
        killproc supervisord
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/supervisord
}

restart() {
        stop
        start
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|force-reload|reload)
        restart
        ;;
  condrestart)
        [ -f /var/lock/subsys/supervisord ] && restart
        ;;
  status)
        status supervisord
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
        exit 1
esac

exit $RETVAL
<<EOF

chmod a+x /etc/init.d/supervisord

service supervisord start

安装supervisor

标签:chmod   mmc   sage   ret   starting   web   roc   mon   reload   

原文地址:https://www.cnblogs.com/morse/p/13408934.html

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