欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

启动 supervisor 后有警告 有大用 有大用

[root@ebs-22233 ~]# service supervisord restart

停止 supervisord:                                         [确定]

正在启动 supervisord:/usr/lib/python2.6/site-packages/supervisor-3.3.4-py2.6.eg                                                 g/supervisor/options.py:461: UserWarning: Supervisord is running as root and it                                                  is searching for its configuration file in default locations (including its curr                                                 ent working directory); you probably want to specify a "-c" argument specifying                                                  an absolute path to a configuration file for improved security.

  'Supervisord is running as root and it is searching '


下面是启动脚本  /etc/rc.d/init.d/supervisord 的中间 红色加粗部分 (因为有的地方直接是 daemon supervisord )

如改成下面的 红色加粗部分 就不会有上面这个警告


#!/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/supervisor/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 -c /etc/supervisord.conf "    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

普通分类: